NaturalIntelligence / fast-xml-parser

Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
https://naturalintelligence.github.io/fast-xml-parser/
MIT License
2.45k stars 296 forks source link

How to insert a string containing single quotes into #text? #572

Open mingyec opened 1 year ago

mingyec commented 1 year ago

I am using the latest version of fxp. Normally, I can successfully change the #text value of a certain tag. However, when I try to insert a string containing single quotes or other special characters, the builder will escape them automatically, which is not what I want. Here is an example:

value['#text'] = `{{ fn('${generateKey(text)}') }}`;

output:

<div>{{ fn(&apos;content&apos;) }}</div>
github-actions[bot] commented 1 year ago

We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.