From cf9e73ef6b3634f21cf217171f0bdbb7d931aada Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 24 May 2018 13:44:37 -0500 Subject: [PATCH] Fix use of non-standard string.replace function flags argument https://bugzilla.mozilla.org/show_bug.cgi?id=1108382 This was causing relative file paths for launching KeePass.exe to not work on windows Fixed #5 --- xul-ext/modules/KF.js | 2 +- xul-ext/modules/locales.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xul-ext/modules/KF.js b/xul-ext/modules/KF.js index d28b5a1..02deeba 100644 --- a/xul-ext/modules/KF.js +++ b/xul-ext/modules/KF.js @@ -536,7 +536,7 @@ KeeFox.prototype = { // If user has defined a relative URL, convert it to a format that is valid for use with setRelativeDescriptor if (fileName.startsWith('.\\') || fileName.startsWith('..\\')) - fileName = fileName.replace('\\', '/', 'g'); + fileName = fileName.replace(/\\/g, '/'); if (fileName.startsWith('./') || fileName.startsWith('../')) { if (fileName.startsWith('./')) diff --git a/xul-ext/modules/locales.js b/xul-ext/modules/locales.js index 3643135..32551bf 100644 --- a/xul-ext/modules/locales.js +++ b/xul-ext/modules/locales.js @@ -203,7 +203,7 @@ Localisation.prototype = { } // return the key if it all went wrong - name = name.replace("_", " ", "g"); + name = name.replace(/_/g, " "); return name; },