From ca6136ffb67b9f4119cc65d1fb0ce388d4fece7c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 15 May 2018 14:00:38 +0200 Subject: Drop invisible characters from downloads filename. --- toolkit/content/contentAreaUtils.js | 1 + 1 file changed, 1 insertion(+) (limited to 'toolkit/content') diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js index 2b7af30de..736fb7dfc 100644 --- a/toolkit/content/contentAreaUtils.js +++ b/toolkit/content/contentAreaUtils.js @@ -1108,6 +1108,7 @@ function getDefaultFileName(aDefaultFileName, aURI, aDocument, function validateFileName(aFileName) { + aFileName = aFileName.replace(/[\u200e\u200f\u202a-\u202e]/g, ""); var re = /[\/]+/g; if (navigator.appVersion.indexOf("Windows") != -1) { re = /[\\\/\|]+/g; -- cgit v1.2.3