Skip to content

Commit

Permalink
bugfix when string ends with escape sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Dec 13, 2024
1 parent 4fea9c0 commit d3b26bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion std/haxe/xml/Parser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,10 @@ class Parser {
if (parent.nodeType == Element) {
throw new XmlParserException("Unclosed node <" + parent.nodeName + ">", str, p);
}
if (p != start || nsubs == 0) {
if( p != start )
buf.addSub(str, start, p - start);
var str = buf.toString();
if (str.length > 0 || nsubs == 0) {
addChild(Xml.createPCData(buf.toString()));
}
return p;
Expand Down

0 comments on commit d3b26bb

Please sign in to comment.