Skip to content

Commit

Permalink
Additional fix for issue #2 - add pref to allow disabling of double-e…
Browse files Browse the repository at this point in the history
…ncoding special chars, if necessary in future. Also, replace a few more special chars
  • Loading branch information
AE Creations committed Jun 7, 2014
1 parent 4fd8989 commit c942ac0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/chrome/content/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ function delicious_post_dialog_accept() {

function getEncodedStr(aString)
{
let isDblEncodeSpecChars = Application.prefs.getPref("extensions.aecreations.deliciouspost.double_encode_special_chars", true);
if (! isDblEncodeSpecChars) {
return aString;
}

// See <https://github.com/zmanring/chrome-ext-delicious/pull/56> for
// how an author of a Delicious extension for Google Chrome handled an
// issue similar to Delicious Post issue #2.
Expand All @@ -96,7 +101,11 @@ function delicious_post_dialog_accept() {
case 0x00BB: // Right-pointing double angle quotation mark
chr = ">>";
break;
case 0x25B6: // Black right-pointing triangle
chr = ""; // (used in YouTube page titles for playing videos)
break;
case 0x2022: // Bullet
case 0x00B7: // Middle dot
chr = "-";
break;
default:
Expand Down

0 comments on commit c942ac0

Please sign in to comment.