Using cleditor in Internet Explorer 9 causes double-quotes to be incorrectly escaped -
I have moved the Internet in search of the answer to this problem, but, sorry, I have to be compelled to ask for help. / P>
I am using jQuery plugin for its rich text / HTML editing capabilities. For the most part, this works fine though, if I have a strange problem in IE9 below:
- To switch to HTML mode, show the "Source" at the top right of the toolbar "Click the button
-
Paste the following snippet:
& lt; P & gt; Double-quoted notes & lt; / P & gt; & Lt; Div onclick = 'alert ("hi")' & gt; Click me & lt; / Div & gt;
Switch back to Rich Text Mode and make a trivial change (for example, add a location)
- Switch back to HTML mode
Note how double quotes are now incorrectly saved like this:
& lt; Div onclick = "warning (\" hi \ ")" & gt; Click me & lt; / Div & gt;
What's going on here? Div onclick = "warning (& amp;; quot; high & quot;)" & gt;
Click the & lt; / Div>: Other browsers should avoid double quotes like this
I have the unit,
& amp; Quot; to try to use, but it does not matter - IE9 still exceptionally it do anyone know how to fix this issue?
No problem, I understand it and if someone else is struggling with this issue, then I think it CLEditor, XHTML plugin and internet Explorer is the combination to use the
you can fix it by adding this JavaScript snippet before your CLEditor code :.
(function ($) {var oldCallback = $ .cleditor.defaultOptions.updateTextArea; $ .cleditor.defaultOptions.updateTextArea = function (HTML) {if (OldCallback) {html = oldCallback (html );} On! IsIE = / * @ cc_on @ * / false, if (isIE) {return html.replace (/ \\\ "/ g," & amp; quot; ");} else {return html;} };}) (jQuery) ;.
Alternatively, you can conditionally replacement line 1126) to jquery.cleditor.js (CLEditor v1.3.0 are
Comments
Post a Comment