Index: openacs-4/packages/xowiki/www/resources/wymeditor/xhtml_parser.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/xhtml_parser.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/xhtml_parser.js 15 Jul 2007 16:07:45 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/xhtml_parser.js 27 Jul 2007 01:15:20 -0000 1.2 @@ -47,7 +47,7 @@ * # =>
* this.tag ('br', false, true) * # =>
-* this.tag ('input', $j({type:'text',disabled:true }) ) +* this.tag ('input', jQuery({type:'text',disabled:true }) ) * # => */ XmlHelper.prototype.tag = function(name, options, open) @@ -67,9 +67,9 @@ * * this.contentTag ('p', 'Hello world!' ) * # =>

Hello world!

-* this.contentTag('div', this.contentTag('p', "Hello world!"), $j({class : "strong"})) +* this.contentTag('div', this.contentTag('p', "Hello world!"), jQuery({class : "strong"})) * # =>

Hello world!

-* this.contentTag("select", options, $j({multiple : true})) +* this.contentTag("select", options, jQuery({multiple : true})) * # => */ XmlHelper.prototype.contentTag = function(name, content, options) @@ -113,7 +113,7 @@ */ XmlHelper.prototype._fixDoubleEscape = function(escaped) { - return escaped.replace(/&([a-z]+|(#\d+));/i, "&$1;"); + return escaped.replace(/&([a-z]+|(#\d+));/ig, "&$1;"); } /* @@ -1399,22 +1399,26 @@ this.mapHandler('Text', 'Text'); - this.addCommentTokens('Text'); - this.addScriptTokens('Text'); - this.addCssTokens('Text'); - this.addTagTokens('Text'); - + this.addTokens(); + this.init(); return this; } - XhtmlLexer.prototype.init = function() { } +XhtmlLexer.prototype.addTokens = function() +{ + this.addCommentTokens('Text'); + this.addScriptTokens('Text'); + this.addCssTokens('Text'); + this.addTagTokens('Text'); +} + XhtmlLexer.prototype.addCommentTokens = function(scope) { this.addEntryPattern("