suneditor 2.44.7 → 2.44.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/suneditor.min.js +2 -2
- package/package.json +1 -1
- package/src/lib/core.js +2 -2
package/package.json
CHANGED
package/src/lib/core.js
CHANGED
|
@@ -5262,7 +5262,7 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
5262
5262
|
if (style) {
|
|
5263
5263
|
const allowedStyle = [];
|
|
5264
5264
|
for (let i = 0, len = style.length, r; i < len; i++) {
|
|
5265
|
-
r = style[i].match(/([a-zA-Z0-9-]+)(:)([
|
|
5265
|
+
r = style[i].match(/([a-zA-Z0-9-]+)(:)([^"]+)/);
|
|
5266
5266
|
if (r && !/inherit|initial|revert|unset/i.test(r[3])) {
|
|
5267
5267
|
const k = util.kebabToCamelCase(r[1].trim());
|
|
5268
5268
|
const v = this.wwComputedStyle[k].replace(/"/g, '');
|
|
@@ -5447,7 +5447,7 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
|
|
|
5447
5447
|
* @returns {String}
|
|
5448
5448
|
*/
|
|
5449
5449
|
cleanHTML: function (html, whitelist, blacklist) {
|
|
5450
|
-
html = this._deleteDisallowedTags(this._parser.parseFromString(html, 'text/html').body.innerHTML).replace(/(<[a-zA-Z0-9\-]+)[^>]*(?=>)/g, this._cleanTags.bind(this, true));
|
|
5450
|
+
html = this._deleteDisallowedTags(this._parser.parseFromString(html, 'text/html').body.innerHTML).replace(/(<[a-zA-Z0-9\-]+)[^>]*(?=>)/g, this._cleanTags.bind(this, true)).replace(/<br\/?>$/i, '');
|
|
5451
5451
|
const dom = _d.createRange().createContextualFragment(html);
|
|
5452
5452
|
try {
|
|
5453
5453
|
util._consistencyCheckOfHTML(dom, this._htmlCheckWhitelistRegExp, this._htmlCheckBlacklistRegExp, true);
|