mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
markup/goldmark: Exclude event attributes from markdown render hook
Fixes #9511
This commit is contained in:
@@ -57,6 +57,9 @@ func (a *attributesHolder) Attributes() map[string]string {
|
||||
a.attributesInit.Do(func() {
|
||||
a.attributes = make(map[string]string)
|
||||
for _, attr := range a.astAttributes {
|
||||
if strings.HasPrefix(string(attr.Name), "on") {
|
||||
continue
|
||||
}
|
||||
a.attributes[string(attr.Name)] = string(util.EscapeHTML(attr.Value.([]byte)))
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user