pub fn escape_attribute_bytes<'a, S: Into<Cow<'a, [u8]>>>(
    input: S
) -> Cow<'a, [u8]>
Expand description

Escape a byte string to be used in a quoted attribute.

use htmlize::escape_attribute_bytes;

assert_eq!(
    escape_attribute_bytes(b"test: &<>\"'".as_slice()),
    b"test: &amp;&lt;&gt;&quot;'".as_slice()
);

To work with String instead of bytes, see escape_attribute().