Roo/htmleditor/TidyEntities.js
authorAlan <alan@roojs.com>
Thu, 6 Jan 2022 08:55:45 +0000 (16:55 +0800)
committerAlan <alan@roojs.com>
Thu, 6 Jan 2022 08:55:45 +0000 (16:55 +0800)
Roo/htmleditor/TidyEntities.js

index e4930c4..8a664a9 100644 (file)
@@ -658,9 +658,10 @@ Roo.htmleditor.TidyEntities = {
      * @return {String} Entity encoded text.
      */
     encodeNamed: function(text, attr, entities) {
-        entities = entities || namedEntities;
-        return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
-            return baseEntities[chr] || entities[chr] || chr;
+        var t = this;
+        entities = entities || this.namedEntities;
+        return text.replace(attr ? this.attrsCharsRegExp : this.textCharsRegExp, function(chr) {
+            return t.baseEntities[chr] || entities[chr] || chr;
         });
     },
     /**