Skip to main content

decode_style

Function decode_style 

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

Decode text from the <style> element.

The following substring is unescaped:

  • <\/style> => </style>
  • <\!-- => <!--

<\/style at the end of the text is also unescaped. This only removes the listed escapes and does not parse CSS. Existing escapes in the original text may also be removed, so encoding and decoding may not return the original text.