Skip to content

Escaping ampersand character with following semicolon #169

Answered by mglanville
Quty asked this question in Q&A
Discussion options

You must be logged in to vote

I think the problem is the way that xmlbuilder2 tries to avoid double-encoding XML escape sequences. Your string is being treated as an XML entity by nonEntityAmpersandRegex so the ampersand doesn't get replaced.

I'm currently hitting a problem with the same code, but that's because I wan't the ampersand in the text b&w to be encoded and xmlbuilder2 seems to have been deliberately built to not do that.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Quty
Comment options

Answer selected by Quty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants