diff --git a/4chan_x.user.js b/4chan_x.user.js index b8c693d02..1f91c4025 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2699,7 +2699,7 @@ case '$2': return "' + img.href + '"; case '$3': - return "' + img.firstChild.dataset.md5.replace(/\=*$/, '') + '"; + return "' + encodeURIComponent(img.firstChild.dataset.md5) + '"; case '$4': return g.BOARD; } diff --git a/script.coffee b/script.coffee index 0bf1ce2f9..cb4992f33 100644 --- a/script.coffee +++ b/script.coffee @@ -2113,7 +2113,7 @@ Sauce = when '$2' "' + img.href + '" when '$3' - "' + img.firstChild.dataset.md5.replace(/\=*$/, '') + '" + "' + encodeURIComponent(img.firstChild.dataset.md5) + '" when '$4' g.BOARD href = Function 'img', "return '#{href}'"