Skip to content

Commit

Permalink
* Use proper escaping for xpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Daniels committed Jun 9, 2012
1 parent 65609bb commit 70df01c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins-client/ext.tree/tree.js
Expand Up @@ -398,7 +398,7 @@ module.exports = ext.register("ext/tree/tree", {

var count = 0;
filename.match(/\.(\d+)$/, "") && (count = parseInt(RegExp.$1, 10));
while (args[0].selectSingleNode('node()[@name="' + filename.replace(/"/g, """) + '"]')) {
while (args[0].selectSingleNode('node()[@name=' + escapeXpathString(filename) + ']')) {
filename = filename.replace(/\.(\d+)$/, "");

var idx = filename.lastIndexOf(".");
Expand Down

0 comments on commit 70df01c

Please sign in to comment.