From ae00f8b0791befcb1c1dd7428e98887da9bad969 Mon Sep 17 00:00:00 2001 From: Pale Moon Date: Tue, 15 May 2018 13:57:48 +0200 Subject: Drop invisible characters from downloads filename. --- toolkit/content/contentAreaUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js index 04928d84b..ab905be16 100644 --- a/toolkit/content/contentAreaUtils.js +++ b/toolkit/content/contentAreaUtils.js @@ -976,6 +976,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