[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 409/483: Topic 9699 - Treat backslashes in attribute values correctly

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:42:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit 06a3fb75931ebe785aadc7052970bd98d183e317
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Fri Mar 9 16:56:34 2012 +0100

    Topic 9699 - Treat backslashes in attribute values correctly
---
 chrome/content/composer.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/content/composer.js b/chrome/content/composer.js
index 9d35762..a926b99 100644
--- a/chrome/content/composer.js
+++ b/chrome/content/composer.js
@@ -267,7 +267,7 @@ function updateExpression()
 
           if (useFallback)
           {
-            var escapedValue = attr.selected.replace(/"/g, '\\"')
+            var escapedValue = attr.selected.replace(/(["\\])/g, '\\$1')
                                             .replace(/([\{\}])/g, escapeChar)
                                             .replace(/([^\S ])/g, escapeChar);
             expression += "[" + escapedName + op + '"' + escapedValue + '"' + "]";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list