pub fn htmlspecialchars(
s: &[u8],
flags: HtmlFlags,
double_encode: bool,
) -> Vec<u8> ⓘExpand description
PHP htmlspecialchars($string, $flags, 'UTF-8', $double_encode):
escapes & < > and the quotes flags selects (' as ' in HTML
4.01, ' otherwise). With double_encode false, existing valid
entities are kept. Invalid UTF-8 follows ENT_IGNORE/ENT_SUBSTITUTE,
else the result is empty.