From eb48d8cd41f90499b6123a679c0a6474f2d5f644 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 6 Jan 2022 16:55:07 +0800 Subject: [PATCH] Roo/htmleditor/TidyEntities.js --- Roo/htmleditor/TidyEntities.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Roo/htmleditor/TidyEntities.js b/Roo/htmleditor/TidyEntities.js index 82c8fe53fc..2d885fa102 100644 --- a/Roo/htmleditor/TidyEntities.js +++ b/Roo/htmleditor/TidyEntities.js @@ -623,8 +623,9 @@ Roo.htmleditor.TidyEntities = { * @return {String} Entity encoded text. */ encodeAllRaw: function(text) { - return ('' + text).replace(rawCharsRegExp, function(chr) { - return baseEntities[chr] || chr; + var t = this; + return ('' + text).replace(this.rawCharsRegExp, function(chr) { + return t.baseEntities[chr] || chr; }); }, /** @@ -637,6 +638,7 @@ Roo.htmleditor.TidyEntities = { * @return {String} Entity encoded text. */ encodeNumeric: function(text, attr) { + var t = this; return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) { // Multi byte sequence convert it to a single entity if (chr.length > 1) { -- 2.39.2