- Refactoring: lbs; clarify
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user