From 0029a932b2735e98928be35f2c8ecff8b47ac289 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Sat, 4 Jan 2020 17:32:19 +0800 Subject: [PATCH] - Fix: Misspelling for `dropXMLInternalSubset` method (also fixes use in imagelib when defaulting to image's title) - Fix: Redirect paths for imagelib redirect checks --- CHANGES.md | 3 +++ editor/extensions/imagelib/index-es.html | 4 ++-- editor/extensions/imagelib/index.html | 4 ++-- editor/svgcanvas.js | 6 +++--- editor/utilities.js | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c510178c..e78d1ff6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,9 @@ - Fix: main menu style and text #371 - Fix (Accessibility): Avoid duplicate IDs - Fix (openclipart browser): Redirect on lacking browser support +- Fix: Misspelling for `dropXMLInternalSubset` method (also fixes + use in imagelib when defaulting to image's title) +- Fix: Redirect paths for imagelib redirect checks - Optimization: Remove unused `jquery-ui-1.8.custom.min.js` file - Localization: Add 'SVG-Edit Home Page' to locale files - Refactoring: Ensure file-global tags are at beginning of file diff --git a/editor/extensions/imagelib/index-es.html b/editor/extensions/imagelib/index-es.html index 420fe50b..3e782dee 100644 --- a/editor/extensions/imagelib/index-es.html +++ b/editor/extensions/imagelib/index-es.html @@ -6,8 +6,8 @@ - - + + diff --git a/editor/extensions/imagelib/index.html b/editor/extensions/imagelib/index.html index 803f178d..2c0c54ae 100644 --- a/editor/extensions/imagelib/index.html +++ b/editor/extensions/imagelib/index.html @@ -7,8 +7,8 @@ - - + + diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index dbf402fa..f0a24e5f 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -38,7 +38,7 @@ import { preventClickDefault, snapToGrid, walkTree, walkTreePost, getBBoxOfElementAsPath, convertToPath, toXml, encode64, decode64, dataURLToObjectURL, createObjectURL, - getVisibleElements, dropXMLInteralSubset, + getVisibleElements, dropXMLInternalSubset, init as utilsInit, getBBox as utilsGetBBox, getStrokedBBoxDefaultVisible, isNullish } from './utilities.js'; @@ -7251,7 +7251,7 @@ this.clear(); * @property {module:history.HistoryCommand} BatchCommand * @property {module:history.HistoryCommand} ChangeElementCommand * @property {module:utilities.decode64} decode64 -* @property {module:utilities.dropXMLInteralSubset} dropXMLInteralSubset +* @property {module:utilities.dropXMLInternalSubset} dropXMLInternalSubset * @property {module:utilities.encode64} encode64 * @property {module:svgcanvas~ffClone} ffClone * @property {module:svgcanvas~findDuplicateGradient} findDuplicateGradient @@ -7291,7 +7291,7 @@ this.getPrivateMethods = function () { BatchCommand, ChangeElementCommand, decode64, - dropXMLInteralSubset, + dropXMLInternalSubset, encode64, ffClone, findDefs, diff --git a/editor/utilities.js b/editor/utilities.js index 6cb6af05..8d0086b2 100644 --- a/editor/utilities.js +++ b/editor/utilities.js @@ -104,12 +104,12 @@ export const init = function (editorContext) { /** * Used to prevent the [Billion laughs attack]{@link https://en.wikipedia.org/wiki/Billion_laughs_attack}. - * @function module:utilities.dropXMLInteralSubset + * @function module:utilities.dropXMLInternalSubset * @param {string} str String to be processed * @returns {string} The string with entity declarations in the internal subset removed * @todo This might be needed in other places `parseFromString` is used even without LGTM flagging */ -export const dropXMLInteralSubset = (str) => { +export const dropXMLInternalSubset = (str) => { return str.replace(/()/, '$1$2'); // return str.replace(/(?\?\]>)/, '$$'); };