[Pkg-mozext-commits] [wot] 80/226: Fixes #36 The addon leaks markup in "Note" in FB

David Prévot taffit at moszumanska.debian.org
Fri May 1 00:35:36 UTC 2015


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

taffit pushed a commit to branch master
in repository wot.

commit ac21ced6277f7fde55615b94c83aa28917d9bc26
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date:   Wed May 15 14:32:42 2013 +0300

    Fixes #36 The addon leaks markup in "Note" in FB
---
 content/popup.js | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/content/popup.js b/content/popup.js
index 45f67a5..e538628 100644
--- a/content/popup.js
+++ b/content/popup.js
@@ -1,6 +1,6 @@
 /*
 	popup.js
-	Copyright © 2006 - 2012  WOT Services Oy <info at mywot.com>
+	Copyright © 2006 - 2013  WOT Services Oy <info at mywot.com>
 
 	This file is part of WOT.
 
@@ -97,8 +97,8 @@ var wot_popup =
 	{
 		try {
 			if (!wot_prefs.show_search_popup) {
-				return false;
-			}
+                return false;
+            }
 
 			if (!this.layer) {
 				this.layer = WOT_POPUP_LAYER;
@@ -118,7 +118,17 @@ var wot_popup =
 				return true;
 			}
 
-			var layer = content.createElement("div");
+            if (!elem) {
+                var body = content.getElementsByTagName("body");
+
+                if (body && body.length) {
+                    elem = body[0];
+                }
+            }
+
+            if (elem.isContentEditable) return false;
+
+            var layer = content.createElement("div");
 			layer.setAttribute("id", this.id);
 			layer.setAttribute("class", "wot-popup-layer");
 			layer.setAttribute("style", "display: none; cursor: pointer;");
@@ -128,13 +138,6 @@ var wot_popup =
 			style.setAttribute("type", "text/css");
 			style.innerHTML = WOT_POPUP_STYLE;
 
-			if (!elem) {
-				var body = content.getElementsByTagName("body");
-
-				if (body && body.length) {
-					elem = body[0];
-				}
-			}
 
 			var head = content.getElementsByTagName("head");
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git



More information about the Pkg-mozext-commits mailing list