Function html_escape::encode_single_quoted_attribute[][src]

pub fn encode_single_quoted_attribute<S: ?Sized + AsRef<str>>(
    text: &S
) -> Cow<'_, str>

Encode text used in a single-quoted attribute.

The following characters are escaped:

  • & => &amp;
  • < => &lt;
  • > => &gt;
  • ' => &#x27;