encoding/json: shows #ZgotmplZ in a custom attribute with name "data-data" but not with "data-go" #12648
Comments
I took a look this since I'm currently playing with the html/template package. When checking the type of known attributes the html/template package removes "data-" prefixes so it can handle things like So I'd say this works as intended. But we should at least update the documentation to state that data-* attributes and attributes with namespaces are handled as if they had no data- prefix / namespace. |
Change https://golang.org/cl/79895 mentions this issue: |
The error occurs when marshal a struct in a HTML inside of a custom attribute with name
data-data
but not with other name (for example,data-go
)http://play.golang.org/p/Wui-dfKLDx
The text was updated successfully, but these errors were encountered: