-
Notifications
You must be signed in to change notification settings - Fork 18k
encoding/xml: ,innerxml
values are not escaped.
#16604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The docs do say "a field with tag ",innerxml" is written verbatim, not subject to the usual marshalling procedure". I feel like we probably can't change the behavior at this point. What made you think that ampersands would be escaped? |
I got problems when using |
I think this is working as intended. Innerxml fields are supposed to
contain the exact inner XML data in verbatim. If we escape any
meta-characters then innerxml fields won't roundtrip anymore. The user is
supposed to provide valid XML for such fields.
|
I understand it, the user has to provide a valid value for the field. I'm sorry about it. |
If you need automatic escaping you should use |
@kostya-sh this is great! :) Thanks. |
go version
)?go env
)?https://play.golang.org/p/r-pLR_UIXe
This is causing problems for other software to parse the generated XML file.
The text was updated successfully, but these errors were encountered: