xmlbuilder2 icon indicating copy to clipboard operation
xmlbuilder2 copied to clipboard

Encode all Ampersands

Open coffeemakr opened this issue 3 years ago • 2 comments

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

coffeemakr avatar Mar 28 '22 11:03 coffeemakr

We encounter the same problem and would be grateful if this gets merged!

andrenarchy avatar May 12 '22 20:05 andrenarchy

We're hitting this as well. Happy to scrub in here to get this over the finish line.

vanstinator avatar Jul 14 '22 15:07 vanstinator

Also made some additions in #154. All tests now passing.

jgrubb16 avatar Nov 17 '22 18:11 jgrubb16