Open ROpdebee opened 2 years ago
Example
const profile = new FirefoxProfile(); profile.setPreference('foo', '"bar"'); profile.updatePreferences(); console.log(await readFile(profile.userPrefs, { encoding: 'utf8' }));
This leads to a file containing the following line:
user_pref("foo", ""bar"");
and FF errors out because it's invalid.
Workaround
profile.defaultPreferences['foo'] = JSON.stringify('"bar"'); profile.updatePreferences();
Potential fix
Use JSON.stringify in setPreference. That might be able to replace the custom cleaning logic altogether.
JSON.stringify
setPreference
Example
This leads to a file containing the following line:
and FF errors out because it's invalid.
Workaround
Potential fix
Use
JSON.stringify
insetPreference
. That might be able to replace the custom cleaning logic altogether.