Changes the parsing of CDATA sections to not escape entities.
In other words:
Before: <[CDATA[&]]> -> &
After: <[CDATA[&]]> -> &
I also added a new test so that this behavior can be tested on its own.
Please note that I did not attempt to avoid any breaking changes here as the issue suggested, but if it is desired, I would be happy to gate this fix behind a new option.
The contents of a CDATA section will also now be run through tagValueProcessor even when the cdataPropName option is provided. I am unsure as to if this inconsistency was intentional (the code that would have made it consistent seems to have been commented out a while ago), so if that is considered an unrelated change, I would also be happy to split it out into a separate PR.
coverage: 98.251% (+0.004%) from 98.247%
when pulling 66384d116e5f2316fa0100170869e0f570756118 on wackbyte:cdata
into 291fe7380206f20355abc971946830dbf72d07f0 on NaturalIntelligence:master.
Purpose / Goal
Changes the parsing of CDATA sections to not escape entities.
In other words:
<[CDATA[&]]>
->&
<[CDATA[&]]>
->&
I also added a new test so that this behavior can be tested on its own.
Please note that I did not attempt to avoid any breaking changes here as the issue suggested, but if it is desired, I would be happy to gate this fix behind a new option.
The contents of a CDATA section will also now be run through
tagValueProcessor
even when thecdataPropName
option is provided. I am unsure as to if this inconsistency was intentional (the code that would have made it consistent seems to have been commented out a while ago), so if that is considered an unrelated change, I would also be happy to split it out into a separate PR.Closes #632.
Performance tests
Before:
After:
Type
Please mention the type of PR