Ticket #5096: 5096.patch

File 5096.patch, 826 bytes (added by Garry Yao, 14 years ago)
  • _source/plugins/htmlwriter/plugin.js

     
    171171                 */
    172172                attribute : function( attName, attValue )
    173173                {
    174                         if ( this.forceSimpleAmpersand )
    175                                 attValue = attValue.replace( /&/, '&' );
    176174
    177                         // Browsers don't always escape quote in attribute values. (#4683)
    178175                        if ( typeof attValue == 'string' )
     176                        {
     177                                this.forceSimpleAmpersand && ( attValue = attValue.replace( /&/g, '&' ) );
     178                                // Browsers don't always escape quote in attribute values. (#4683)
    179179                                attValue = attValue.replace( /"/g, '"' )
     180                        }
    180181
    181182                        this._.output.push( ' ', attName, '="', attValue, '"' );
    182183                },
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy