We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#[test] fn test() { lol_html::rewrite_str( r#" <img alt="Foo & Bar" src=example.png> "#, lol_html::RewriteStrSettings { element_content_handlers: vec![ lol_html::element!("img", |e| { assert_eq!(e.get_attribute("alt").as_deref(), Some("Foo & Bar")); Ok(()) }), ], ..Default::default() }).unwrap(); }
thread 'test' panicked at 'assertion failed: `(left == right)` left: `Some("Foo & Bar")`, right: `Some("Foo & Bar")`', src/main.rs:10:21
Expected behaviour: The entities are decoded. Actual behaviour: The source representation of the attribute contents are returned.
Workaround: Manually decode the string returned from get_attribute.
get_attribute
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected behaviour: The entities are decoded.
Actual behaviour: The source representation of the attribute contents are returned.
Workaround: Manually decode the string returned from
get_attribute
.The text was updated successfully, but these errors were encountered: