pub fn unescape_html(value: &str) -> StringExpand description
Unescapes HTML entities in a string.
This function replaces HTML entities with their corresponding characters:
&becomes&<becomes<>becomes>"becomes"'and'become'/and/become/
§Arguments
value- The string to unescape.
§Returns
A new string with HTML entities unescaped.
§Examples
use metadata_gen::utils::unescape_html;
let input = "Hello, <world>!";
let expected = "Hello, <world>!";
assert_eq!(unescape_html(input), expected);§Security
This function should be used with caution, especially on user-supplied input, as it can potentially introduce security vulnerabilities if the unescaped content is then rendered as HTML.