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
Encountered this today, ammonia panicked when cleaning one of Troy Hunt's blog posts in my RSS reader.
Code and input data can be found in this repo. It seems something with ammonia::UrlRelative::RewriteWithBase is messing it up, when I remove that it doesn't panic. I skimmed through the HTML as well and didn't see anything out of the ordinary.
The text was updated successfully, but these errors were encountered:
It's possible for `Url::parse("xxx") == Err(url::ParseError::RelativeUrlWithoutBase)` to evaluate to true,
but for the eventual `url.join("xxx")` to still fail with a parse erro, depending on what "xxx" actually is.
To detect this, we check that joining succeeds in addition to the normal checks for relative URLs.
This PR also runs "cargo fmt".
Fixes#136
137: Make sure that relative URLs actually work when filtering r=notriddle a=notriddle
It's possible for `Url::parse("xxx") == Err(url::ParseError::RelativeUrlWithoutBase)` to evaluate to true,
but for the eventual `url.join("xxx")` to still fail with a parse erro, depending on what "xxx" actually is.
To detect this, we check that joining succeeds in addition to the normal checks for relative URLs.
This PR also runs "cargo fmt".
Fixes#136
Co-authored-by: Michael Howell <[email protected]>
Encountered this today, ammonia panicked when cleaning one of Troy Hunt's blog posts in my RSS reader.
Code and input data can be found in this repo. It seems something with
ammonia::UrlRelative::RewriteWithBase
is messing it up, when I remove that it doesn't panic. I skimmed through the HTML as well and didn't see anything out of the ordinary.The text was updated successfully, but these errors were encountered: