From 0428ff049d21191444d5650d1d4b5747ce375357 Mon Sep 17 00:00:00 2001 From: Jacob Beard Date: Wed, 28 Mar 2012 13:00:30 -0400 Subject: [PATCH] Fixed issue 26, "XML entities in attributes are not escaped": https://github.com/robrighter/node-xml/issues/26 --- lib/node-xml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node-xml.js b/lib/node-xml.js index 672c44d..03af6b3 100755 --- a/lib/node-xml.js +++ b/lib/node-xml.js @@ -631,7 +631,7 @@ XMLP.prototype._replaceEntities = function(strD, iB, iE) { iEB = strD.indexOf("&", iB); iEE = iB; - while((iEB > 0) && (iEB < iE)) { + while((iEB > -1) && (iEB < iE)) { strRet += strD.substring(iEE, iEB); iEE = strD.indexOf(";", iEB) + 1;