You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you included sample input, output, error, and expected output?
Have you checked if you are using correct configuration?
Did you try online tool? (there doesn't seem to be a way to add stop nodes to the online tool)
Description
When the allowBooleanAttributes flag is set on XMLParser, the parser will interpret the closing / in a self-closing stop node as a boolean attribute. This introduces further problems when attempting to build the parsed data back into a string, as it produces invalid XML. E.g., <script src="script.js" /> becomes <script src="script.js" //> (note the double slash).
It is possible to implement a workaround by adding an updateTag method that removes @_/ attributes.
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.
smoores-dev
added a commit
to smoores-dev/storyteller
that referenced
this issue
May 13, 2024
Work around a bug in fast-xml-parser: NaturalIntelligence/fast-xml-parser#654
Also use the `parseNodeValue` flag to disable parsing node values to numbers and booleans, removing the need for other workarounds.
Changelog: fixed
Thanks to highlight it. We would have to put a condition in the code to avoid an attribute having the name "/" or "/>" or ">" or any other possibility.
Description
When the
allowBooleanAttributes
flag is set onXMLParser
, the parser will interpret the closing/
in a self-closing stop node as a boolean attribute. This introduces further problems when attempting to build the parsed data back into a string, as it produces invalid XML. E.g.,<script src="script.js" />
becomes<script src="script.js" //>
(note the double slash).It is possible to implement a workaround by adding an
updateTag
method that removes@_/
attributes.Input
Code
Output
expected data
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
The text was updated successfully, but these errors were encountered: