r1357 - xwiki/trunk/src/main/web/wiki_editor/plugins

Phung Hai Nam namphunghai at users.forge.objectweb.org
Wed Oct 4 12:29:14 CEST 2006


Author: namphunghai
Date: 2006-10-04 12:29:14 +0200 (Wed, 04 Oct 2006)
New Revision: 1357

Modified:
   xwiki/trunk/src/main/web/wiki_editor/plugins/core.js
Log:
Fixed bug XWIKI-324 : "Turning characters like " and & are turned into " and &"

Modified: xwiki/trunk/src/main/web/wiki_editor/plugins/core.js
===================================================================
--- xwiki/trunk/src/main/web/wiki_editor/plugins/core.js	2006-10-03 13:58:48 UTC (rev 1356)
+++ xwiki/trunk/src/main/web/wiki_editor/plugins/core.js	2006-10-04 10:29:14 UTC (rev 1357)
@@ -34,7 +34,8 @@
     this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal');
 
     this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>');
-	this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*');
+    this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>');
+    this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*');
 
 	this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>');
 	this.addInternalProcessor((/<em[^>]*>(.*?)<\/em>/gi), '~~$1~~');
@@ -63,7 +64,7 @@
                   "?|©|®|¢|?|¥|" +
                   "£|¤|" +
                   //Other characters
-                  ">|<";
+                  ">|<|&|\"";
     var characterEntityStr = "&Agrave;|&Aacute;|&Acirc;|&Atilde;|&Auml;|&Aring;|" +
                              "&AElig;|&Ccedil;|&Egrave;|&Eacute;|&Ecirc;|&Euml;|" +
                              "&Igrave;|&Iacute;|&Icirc;|&Iuml;|&Ntilde;|&Ograve;|" +
@@ -78,7 +79,7 @@
                              "&trade;|&copy;|&reg;|&cent;|&euro;|&yen;|" +
                              "&pound;|&curren;|" +
                              //Other characters
-                             "&gt;|&lt;"
+                             "&gt;|&lt;|&amp;|&quot;"
 
     var characterEntitys = characterEntityStr.split("|");
     var chars = charStr.split("|");





More information about the Xwiki-notifications mailing list