xmlbuilder2
xmlbuilder2 copied to clipboard
Encode all Ampersands
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.
Fixes #110 and #109
Type of change:
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
We encounter the same problem and would be grateful if this gets merged!
We're hitting this as well. Happy to scrub in here to get this over the finish line.
Also made some additions in #154. All tests now passing.