Skip to content

Commit

Permalink
stripping tags from URL scheme just to make sure as noted in #9, also c…
Browse files Browse the repository at this point in the history
…loses #9
  • Loading branch information
AykutCevik committed Oct 2, 2019
1 parent 45c1363 commit 3e1b4d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function displayWhitelistedDomains(domains) {
var htmlTmpl = document.getElementById('template_list_item').innerHTML;
domains.forEach(function (domain) {
var punycodeDomain = punycode.toUnicode(domain);
punycodeDomain.replace(/<[^>]*>?/gm, '');
punycodeDomain = punycodeDomain.replace(/([^a-zA-Z0-9\-\.]+)/g, '<span style="color: red; ">$1</span>');
var itemHtml = htmlTmpl.replace(/__DOMAIN_TEXT__/g, punycodeDomain);
var itemHtml = itemHtml.replace(/__DOMAIN__/g, domain);
Expand Down
1 change: 1 addition & 0 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function displayBlockedDomains(urls) {
var htmlTmpl = document.getElementById('template_list_item').innerHTML;
urls.forEach(function (domain) {
var punycodeDomain = punycode.toUnicode(domain);
punycodeDomain.replace(/<[^>]*>?/gm, '');
punycodeDomain = punycodeDomain.replace(/([^a-zA-Z0-9\-\.]+)/g, '<span style="color: red; ">$1</span>');
var itemHtml = htmlTmpl.replace(/__DOMAIN_TEXT__/g, punycodeDomain);
var itemHtml = itemHtml.replace(/__DOMAIN__/g, domain);
Expand Down

0 comments on commit 3e1b4d0

Please sign in to comment.