[Pkg-mozext-commits] [tabmixplus] 93/107: Follow up bug 1218249 - check type of node before using xlink:href

David Prévot taffit at moszumanska.debian.org
Tue Dec 29 19:02:54 UTC 2015


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 9587e1ad70fa4eb432783988c14e9d88fdbbde9f
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Dec 6 23:58:12 2015 +0200

    Follow up bug 1218249 - check type of node before using xlink:href
---
 chrome/content/content.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/chrome/content/content.js b/chrome/content/content.js
index 6a7eb6e..656ebed 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -316,7 +316,9 @@ var TabmixClickEventHandler = {
     let href, baseURI;
     node = event.target;
     while (node && !href) {
-      if (node.nodeType == content.Node.ELEMENT_NODE) {
+      if (node.nodeType == content.Node.ELEMENT_NODE &&
+          (node.localName == "a" ||
+           node.namespaceURI == "http://www.w3.org/1998/Math/MathML")) {
         href = node.getAttributeNS("http://www.w3.org/1999/xlink", "href");
         if (href) {
           baseURI = node.ownerDocument.baseURIObject;

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



More information about the Pkg-mozext-commits mailing list