You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(metadata): the base href in the front matter keeps its character references encoded #509
P1Operator-facing: wrong output on a common path, or a secret reaching logs or errorsbugSomething isn't workingoperatorAn operator would hit this in normal use; ranks above dev, test and edge casesrustPull requests that update rust code
The front matter copies the <base href> value as written, with its character references still encoded. For <base href="https://example.com/it's/">, the metadata holds base-href: https://example.com/it's/ instead of https://example.com/it's/.
Where
The base extraction in the head metadata (head_metadata.rs, around line 168 in 3.14.3) reads the raw attribute bytes and stores them without decoding. Browsers decode attribute values before they use them, and the converter already decodes character references in text with the WHATWG rules.
Fix
Decode the attribute value with the same WHATWG character-reference rules before storing it, including the Windows-1252 table for numeric references 128-159. Check the other head attributes this module stores for the same defect.
Downstream
crawlberg works around this in xberg-io/crawlberg#123 by writing the resolved base unencoded before conversion. A test there fails when the converter starts decoding, so the workaround can be removed at that point.
P1Operator-facing: wrong output on a common path, or a secret reaching logs or errorsbugSomething isn't workingoperatorAn operator would hit this in normal use; ranks above dev, test and edge casesrustPull requests that update rust code
Activity
fix(metadata): decode character references in the base href, canonica…