- Refactoring: lbs; clarify

master
Brett Zamir 2020-01-05 17:42:47 +08:00
parent 711cfc4ecc
commit bf2409fd4c
2 changed files with 9 additions and 4 deletions

View File

@ -40,7 +40,7 @@ export default {
// would thereby be set with an empty value, erasing any of the // would thereby be set with an empty value, erasing any of the
// user's prior work. To change this behavior so that no use of storage // user's prior work. To change this behavior so that no use of storage
// or adding of new storage takes place regardless of settings, set // or adding of new storage takes place regardless of settings, set
// the "noStorageOnLoad" config setting to true in svgedit-config-iife.js. // the "noStorageOnLoad" config setting to true in svgedit-config-*.js.
noStorageOnLoad, noStorageOnLoad,
forceStorage forceStorage
} = svgEditor.curConfig; } = svgEditor.curConfig;

View File

@ -743,8 +743,11 @@ editor.init = function () {
} }
if (urldata.extensions) { if (urldata.extensions) {
// For security reasons, disallow cross-domain or cross-folder extensions via URL // For security reasons, disallow cross-domain or cross-folder
urldata.extensions = urldata.extensions.match(/[:/\\]/) ? '' : urldata.extensions.split(','); // extensions via URL
urldata.extensions = urldata.extensions.match(/[:/\\]/)
? ''
: urldata.extensions.split(',');
} }
// Disallowing extension paths via URL for // Disallowing extension paths via URL for
@ -760,7 +763,9 @@ editor.init = function () {
} }
}); });
editor.setConfig(urldata, {overwrite: false}); // Note: source and url (as with storagePrompt later) are not set on config but are used below // Note: `source` and `url` (as with `storagePrompt` later) are not
// set on config but are used below
editor.setConfig(urldata, {overwrite: false});
setupCurConfig(); setupCurConfig();
if (!curConfig.preventURLContentLoading) { if (!curConfig.preventURLContentLoading) {