1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

feat(sanitizer): validate MathML XML namespace

This commit is contained in:
Frédéric Guillot 2025-06-09 20:24:12 -07:00
parent 21d22d7f0b
commit d53fd17e10
2 changed files with 14 additions and 0 deletions

View file

@ -234,6 +234,10 @@ func sanitizeAttributes(baseURL, tagName string, attributes []html.Attribute, sa
continue
}
if tagName == "math" && attribute.Key == "xmlns" && value != "http://www.w3.org/1998/Math/MathML" {
value = "http://www.w3.org/1998/Math/MathML"
}
if tagName == "img" && attribute.Key == "fetchpriority" {
if !isValidFetchPriorityValue(value) {
continue