microcosm-cc / bluemonday

bluemonday: a fast golang HTML sanitizer (inspired by the OWASP Java HTML Sanitizer) to scrub user generated content of XSS
https://github.com/microcosm-cc/bluemonday
BSD 3-Clause "New" or "Revised" License
3.16k stars 175 forks source link

Support four-value syntax for CSS hex color #207

Closed silverwind closed 3 months ago

silverwind commented 6 months ago

Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color

RGB // The three-value syntax

RGBA // The four-value syntax

RRGGBB // The six-value syntax

RRGGBBAA // The eight-value syntax

FiloSottile commented 3 months ago

Thank you for including a test and a spec reference!