Showing
2 changed files
with
7 additions
and
7 deletions
... | ... | @@ -52,7 +52,7 @@ nBildertool.xmlToObjectArray = function (data) |
52 | 52 | case 'class': |
53 | 53 | var cName = child.getAttribute ('class'); |
54 | 54 | |
55 | - if (typeof (eval (cName)) === 'function') | |
55 | + if (eval ('typeof (' + cName + ') === \'function\'')) | |
56 | 56 | ret[name] = eval ("new " + cName + "(child)"); |
57 | 57 | else |
58 | 58 | ret[name] = nBildertool.xmlToObjectArray (child); |
... | ... | @@ -93,10 +93,10 @@ nBildertool.xmlToArray = function (data) |
93 | 93 | case 'class': |
94 | 94 | var cName = child.getAttribute ('class'); |
95 | 95 | |
96 | - if (typeof (eval (cName)) === 'function') | |
97 | - ret[key] = eval ("new " + cName + "(child)"); | |
96 | + if (eval ('typeof (' + cName + ') === \'function\'')) | |
97 | + ret[key] = eval ("new " + cName + "(_child)"); | |
98 | 98 | else |
99 | - ret[key] = nBildertool.xmlToObjectArray (child); | |
99 | + ret[key] = nBildertool.xmlToObjectArray (_child); | |
100 | 100 | } |
101 | 101 | } |
102 | 102 | } |
... | ... | @@ -130,7 +130,7 @@ nBildertool.c_xmlify = function (data) |
130 | 130 | case 'class': |
131 | 131 | var cName = child.getAttribute ('class'); |
132 | 132 | |
133 | - if (typeof (eval (cName)) === 'function') | |
133 | + if (eval ('typeof (' + cName + ') === \'function\'')) | |
134 | 134 | this[name] = eval ("new " + cName + "(child)"); |
135 | 135 | else |
136 | 136 | this[name] = nBildertool.xmlToObjectArray (child); |
... | ... | @@ -154,7 +154,7 @@ nBildertool.deXmlify = function (data) |
154 | 154 | case 'class': |
155 | 155 | var cName = child.getAttribute ('class'); |
156 | 156 | |
157 | - if (typeof (eval (cName)) === 'function') | |
157 | + if (eval ('typeof (' + cName + ') === \'function\'')) | |
158 | 158 | ret = eval ("new " + cName + "(child)"); |
159 | 159 | else |
160 | 160 | ret = nBildertool.xmlToObjectArray (child); | ... | ... |
Please
register
or
login
to post a comment