Comments (4)
Thanks to highlight the issue. The fix for #30 was for incorrect validation/check on attribute name. I believe this may be failing as the RE for attribute value is written for single line. But I'll have to check for proper fix.
from fast-xml-parser.
Though the fix is ready I'm wondering if the "\n" should be replaced with single space " " or no space "". Most of the converters replace it with single space " ", but it may break in case of the second example you have given.
from fast-xml-parser.
I think that a single space is the correct substitution for the newline. In the case of base64 encoding, any amount of whitespace is ignored.
In the Interim, I was able to fix this by preprocessing the XML data:
data = data.replace(/="[^"]*\n([^"]\n)*"/gm, (match) => {
return match.replace(/\n/gm,' ');
});
from fast-xml-parser.
Thanks. I had published the changes along with some more fixes related to XML comments
from fast-xml-parser.
Related Issues (20)
- unreliable for parsing html HOT 2
- Introduce isObject option for unpaired tags HOT 2
- Parsing of Empty Tags HOT 4
- Entities are being processed in CDATA sections HOT 1
- Attribute in oneListGroup is not parsed correctly HOT 1
- All special characters are not correctly parsed HOT 4
- Ability to read & write DOCTYPE information HOT 2
- parser malfunctions when textNodeName is the same as a tag name HOT 8
- Node attributes get lost on XML parsing HOT 1
- Decimal point is not preserved after parsed to json. HOT 6
- Difficulty treating some numeric tags as string HOT 2
- XML parse looks good on Online tool, but when using API crashes HOT 2
- Any tag which has a format like <!D%s> where %s - any sequence of characters is perceived as <!DOCTYPE> and causes error HOT 2
- Not getting attribute value using XMLBuilder.build function HOT 7
- Object doesn't support property or method 'trimStart' HOT 3
- Parser erroneously adds `"@_/": true` attr for self-closing stop nodes HOT 2
- Missing `entities` option in XMLBuilder HOT 2
- XMLBuilder Incorrectly Serializes String "true" as Boolean Attribute HOT 3
- XMLParser - `tagValueProcessor` called only on leaf nodes HOT 5
- Configuration to explicitly disable number parsing for specific xml tag values HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-xml-parser.