-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
& written instead of & #110
Labels
bug
Something isn't working
Comments
I think it's similar issue: |
Seems to be related. Note that in my example, there are .spaces between the |
Yes, yes, I tested with your example, same problem. |
coffeemakr
added a commit
to coffeemakr/xmlbuilder2
that referenced
this issue
Mar 28, 2022
The current regex for replacing ampersands has a flawed check to see if the ampersand is used HTML-encoded character. The regex isn't working because it ignores whitespace between the `&` and the `;` character. Also I don't think it's the responsibility of the writer to interpret if a value has been encoded already. This should fix oozcitak#110 and oozcitak#109
kmasterson-nprdm
pushed a commit
to npr/xmlbuilder2
that referenced
this issue
Nov 11, 2022
Any news on this? |
This was referenced Apr 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When I export the following string to XML:
Hello & world today; or tomorrow
The XML that I get is:
<text>Hello & world today; or tomorrow</text>
This is invalid, because the
&
must be encoded as&
To Reproduce
Export the string
Hello & world today; or tomorrow
to XML.Expected behavior
Expected value:
<text>Hello & world today; or tomorrow</text
Version:
Additional context
I suspect that the root cause is that the parser has a regular expression that assumes that all in between the
&
and;
are treated as an entity.In the example above, if you'd remove the semicolon, it will export
The text was updated successfully, but these errors were encountered: