Function html_escape::encode_script_single_quoted_text[][src]

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

Encode text used in a single quoted text in the <script> element.

The following substring and character are escaped:

  • </script> => <\/script>
  • ' => \'