Function encode_html_entities_attribute

Source
pub fn encode_html_entities_attribute(
    data: &str,
) -> Result<String, Box<dyn Error>>
Expand description

Encodes a string into HTML attribute entities.

ยงExamples

use nutek_encode_lib::encoder;
let encoded = encoder::encode_html_entities_attribute("hello & world").unwrap();
assert_eq!(encoded, "hello&#x20;&amp;&#x20;world");