// endsWithCSSKeyword reports whether b ends with an ident that // case-insensitively matches the lower-case kw. func endsWithCSSKeyword(b []byte, kw string) bool { … } // isCSSNmchar reports whether rune is allowed anywhere in a CSS identifier. func isCSSNmchar(r rune) bool { … } // decodeCSS decodes CSS3 escapes given a sequence of stringchars. // If there is no change, it returns the input, otherwise it returns a slice // backed by a new array. // https://www.w3.org/TR/css3-syntax/#SUBTOK-stringchar defines stringchar. func decodeCSS(s []byte) []byte { … } // isHex reports whether the given character is a hex digit. func isHex(c byte) bool { … } // hexDecode decodes a short hex digit sequence: "10" -> 16. func hexDecode(s []byte) rune { … } // skipCSSSpace returns a suffix of c, skipping over a single space. func skipCSSSpace(c []byte) []byte { … } // isCSSSpace reports whether b is a CSS space char as defined in wc. func isCSSSpace(b byte) bool { … } // cssEscaper escapes HTML and CSS special characters using \<hex>+ escapes. func cssEscaper(args ...any) string { … } var cssReplacementTable … var expressionBytes … var mozBindingBytes … // cssValueFilter allows innocuous CSS values in the output including CSS // quantities (10px or 25%), ID or class literals (#foo, .bar), keyword values // (inherit, blue), and colors (#888). // It filters out unsafe values, such as those that affect token boundaries, // and anything that might execute scripts. func cssValueFilter(args ...any) string { … }