traPtitech / traQ

traQ - traP Internal Messenger Application Backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OGP: metaタグにhtml escapeされたテキストが含まれている場合unescapeされない

motoki317 opened this issue · comments

e.g. https://www.cyberagent.co.jp/careers/students/event/detail/id=28786

<meta name="Description" content="「4種類」のコースにて&amp;quot;現場の最前線で働くプロクリエイター&amp;quot;による3D講義「3D Academy」を開催します。">

html.AttributeのValはunescaped valueがそのまま渡ってくるので、
https://pkg.go.dev/golang.org/x/net/html@v0.10.0#Attribute

ここでescapeすべき

m[a.Key] = a.Val

テストも書くとよい