r1451 - trunk/plugins/Drawer

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Tue Jan 31 14:44:53 2006
New Revision: 1451

Modified:
   trunk/plugins/Drawer/classes.js
Log:
fix entity problems

Modified: trunk/plugins/Drawer/classes.js
==============================================================================
--- trunk/plugins/Drawer/classes.js	(original)
+++ trunk/plugins/Drawer/classes.js	Tue Jan 31 14:44:53 2006
@@ -51,11 +51,13 @@
         
         var sel = window.getSelection();
         sel.selectEditableRange(drawertool.cssr);
-        
+        //make string
+		var te = "" + sel;
+		te = te.replace(/</,"&lt;");
 		if (typeof target == "object") {
-			var xml = "<a xmlns='"+ XHTMLNS + "' href='"+url+"'>"+sel+"</a>";
+			var xml = "<a xmlns='"+ XHTMLNS + "' href='"+url+"'>"+te+"</a>";
 		} else {
-			var xml = "<a xmlns='"+ XHTMLNS + "' href='"+url+"' target='"+target+"'>"+sel+"</a>";
+			var xml = "<a xmlns='"+ XHTMLNS + "' href='"+url+"' target='"+target+"'>"+te+"</a>";
 		}
         
         return bxe_insertContent(xml, BXE_SELECTION);
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.