Copyright © 2014 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
charset() = no_charset | {charset, string()}
import() = no_import | {import, Uri::token(), medialist()}
line() = pos_integer()
media() = [{ident, line(), string()}]
medialist() = [media()]
rules() = list()
stylesheet() = {stylesheet, charset(), import(), rules()}
tk() = '{' | '}' | '[' | ']' | '(' | ')' | ',' | '.' | ':' | '/' | '-' | '+' | '*' | '>' | '=' | badcomment | includes | dashmatch | string | bad_string | ident | hash | import_sym | page_sym | media_sym | charset_sym | important_sym | ems | exs | length | angle | time | freq | dimension | percentage | number | uri | bad_uri | function | literal
token() = {tk(), line(), string()}
tokens() = [token()]
parse/1 | Parse a CSS binary or a token list. |
sanitize/1 | Sanitize a css string, remove all external URI references and injectable content. |
sanitize_style/1 | Sanitize a css style tag, remove all external URI references and injectable content. |
scan/1 | Tokenize a CSS string ot binary, returns a list of tokens. |
parse(B::binary() | tokens()) -> {ok, stylesheet()} | {error, {line(), Error::binary()}}
Parse a CSS binary or a token list. Return a parse tree of the css.
sanitize(Css::binary()) -> {ok, Css::binary()} | {error, {Line::line(), Message::binary()}}
Sanitize a css string, remove all external URI references and injectable content.
sanitize_style(Css::binary() | string()) -> {ok, Css::binary()} | {error, {Line::line(), Message::binary()}}
Sanitize a css style tag, remove all external URI references and injectable content.
scan(Bs::string() | binary()) -> {ok, tokens()}
Tokenize a CSS string ot binary, returns a list of tokens.
Generated by EDoc