Hi
I have an HTML template where I'd like to provide <link> tags externally. I'd like to
leverage html/template's escaping for href. Therefore, it seemed easiest to just
create a struct with fields for rel, href, title and type.
Trying to just use string types means I get everything escaped. Surprisingly, this
means that + gets escaped into +.
Since I've never before seen "application/atom+xml", I'm not convinced that
everything I'd like interop with will correctly turn the HTML entity back into a +.
As the types don't actually vary that much currently, I am fine documenting in code that
either they should be constants, or that they should be separately sanitized. So I tried
using template.HTMLAttr and, when that failed, template.HTML to prevent escaping of the
plus.
This still gets escaped:
Is this a bug? How do I avoid html/template escaping this, while still escaping
href?