X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fhtmlwriter%2Fplugin.js;h=4408402a3ba819a71b241529a15e7ead43817817;hp=5c4a7be25fa906e8b773e015ed4244895877fffb;hb=c6e377a02b54abc07129d72b632763c727476a15;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6 diff --git a/_source/plugins/htmlwriter/plugin.js b/_source/plugins/htmlwriter/plugin.js index 5c4a7be..4408402 100644 --- a/_source/plugins/htmlwriter/plugin.js +++ b/_source/plugins/htmlwriter/plugin.js @@ -171,8 +171,13 @@ CKEDITOR.htmlWriter = CKEDITOR.tools.createClass( */ attribute : function( attName, attValue ) { - if ( this.forceSimpleAmpersand ) - attValue = attValue.replace( /&/, '&' ); + + if ( typeof attValue == 'string' ) + { + this.forceSimpleAmpersand && ( attValue = attValue.replace( /&/g, '&' ) ); + // Browsers don't always escape quote in attribute values. (#4683) + attValue = attValue.replace( /"/g, '"' ); + } this._.output.push( ' ', attName, '="', attValue, '"' ); },