X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fhtmlparser%2Fbasicwriter.js;h=3a0231c8d7423b34f247cee43c1b0ac06328e055;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hp=ecb45f669a5f23486ffd9246422c564997716fe3;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/core/htmlparser/basicwriter.js b/_source/core/htmlparser/basicwriter.js index ecb45f6..3a0231c 100644 --- a/_source/core/htmlparser/basicwriter.js +++ b/_source/core/htmlparser/basicwriter.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -60,6 +60,10 @@ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( */ attribute : function( attName, attValue ) { + // Browsers don't always escape special character in attribute values. (#4683, #4719). + if ( typeof attValue == 'string' ) + attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); + this._.output.push( ' ', attName, '="', attValue, '"' ); }, @@ -117,6 +121,7 @@ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( reset : function() { this._.output = []; + this._.indent = false; }, /**