Bug 1474525 - change the way to escape tags r=Gijs draft escape-pocket-tags
authorRuslan Bekenev <furyinbox@gmail.com>
Sat, 18 Aug 2018 14:10:32 -0700
branchescape-pocket-tags
changeset 830107 ac248184172361e5b0a0ddf955e5553736c27f8c
parent 826854 29d7c031259062bcc09215618787a008778df1fe
push id118812
push userbmo:furyinbox@gmail.com
push dateSat, 18 Aug 2018 21:11:26 +0000
reviewersGijs
bugs1474525
milestone63.0a1
Bug 1474525 - change the way to escape tags r=Gijs MozReview-Commit-ID: 3KZii6HubeI
browser/extensions/pocket/content/panels/js/saved.js
--- a/browser/extensions/pocket/content/panels/js/saved.js
+++ b/browser/extensions/pocket/content/panels/js/saved.js
@@ -396,26 +396,23 @@ var PKT_SAVED_OVERLAY = function(options
             myself.fillSuggestedTags();
         }
     };
     this.createSendToMobilePanel = function(ho2, displayName) {
         PKT_SENDTOMOBILE.create(ho2, displayName, myself.premiumDetailsAdded);
     };
     this.sanitizeText = function(s) {
         var sanitizeMap = {
-            "&": "&amp;",
-            "<": "&lt;",
-            ">": "&gt;",
-            '"': "&quot;",
-            "'": "&#39;"
+            "<": "",
+            ">": "",
         };
         if (typeof s !== "string") {
             return "";
         }
-        return String(s).replace(/[&<>"']/g, function(str) {
+        return String(s).replace(/[<>]/g, function(str) {
             return sanitizeMap[str];
         });
     };
     this.showStateFinalMsg = function(msg) {
         this.wrapper.find(".pkt_ext_tag_detail").one("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd", function(e) {
             $(this).off("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd");
             myself.preventCloseTimerCancel = true;
             myself.startCloseTimer(myself.autocloseTimingFinalState);