Skip to main content

css_is_local

Function css_is_local 

Source
pub fn css_is_local(css: &str) -> bool
Expand description

True when the CSS can’t load anything except embedded data URLs. url(#id) refers to an element in the same document.

Escapes are decoded and comments removed first, the way the CSS tokenizer reads them, so u\72l( and ur/**/l( can’t hide a URL. Text inside strings is kept, which can only make the check stricter.