Skip to content
Permalink
Browse files

Merge branch 't/11777'

  • Loading branch information...
pjasiun committed May 13, 2014
2 parents 6db706a + 60ebc0b commit c32651bcfdfcb1afec317daa626710a7f36c8579
Showing with 5 additions and 4 deletions.
  1. +1 −0 CHANGES.md
  2. +4 −4 plugins/mathjax/plugin.js
@@ -31,6 +31,7 @@ Fixed Issues:
* [#11793](http://dev.ckeditor.com/ticket/11793): Fixed: Drop down is not "on" when clicking it while editor is blurred.
* [#11850](http://dev.ckeditor.com/ticket/11850): Fixed: Filter downcasting fake object to element it replaced is not applied if fake object element is non-editable.
* [#11811](http://dev.ckeditor.com/ticket/11811): Fixed: Widget's data are not encoded correctly when passed to attribute.
* [#11777](http://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin.

Other changes:

@@ -91,7 +91,7 @@
if ( el.children.length > 1 || el.children[ 0 ].type != CKEDITOR.NODE_TEXT )
return;

data.math = el.children[ 0 ].value;
data.math = CKEDITOR.tools.htmlDecode( el.children[ 0 ].value );

// Add style display:inline-block to have proper height of widget wrapper and mask.
var attrs = el.attributes;
@@ -110,7 +110,7 @@
},

downcast: function( el ) {
el.children[ 0 ].replaceWith( new CKEDITOR.htmlParser.text( this.data.math ) );
el.children[ 0 ].replaceWith( new CKEDITOR.htmlParser.text( CKEDITOR.tools.htmlEncode( this.data.math ) ) );

// Remove style display:inline-block.
var attrs = el.attributes;
@@ -384,7 +384,7 @@
* @param {String} value TeX string.
*/
setValue: function( value ) {
newValue = value;
newValue = CKEDITOR.tools.htmlEncode( value );

if ( isInit && !isRunning )
update();
@@ -410,7 +410,7 @@
var doc = iFrame.getFrameDocument(),
tex = doc.getById( 'tex' );

tex.setHtml( CKEDITOR.plugins.mathjax.trim( value ) );
tex.setHtml( CKEDITOR.plugins.mathjax.trim( CKEDITOR.tools.htmlEncode( value ) ) );

CKEDITOR.plugins.mathjax.copyStyles( iFrame, tex );

0 comments on commit c32651b

Please sign in to comment.
You can’t perform that action at this time.