*/\r
attribute : function( attName, attValue )\r
{\r
- if ( this.forceSimpleAmpersand )\r
- attValue = attValue.replace( /&/, '&' );\r
+\r
+ if ( typeof attValue == 'string' )\r
+ {\r
+ this.forceSimpleAmpersand && ( attValue = attValue.replace( /&/g, '&' ) );\r
+ // Browsers don't always escape quote in attribute values. (#4683)\r
+ attValue = attValue.replace( /"/g, '"' );\r
+ }\r
\r
this._.output.push( ' ', attName, '="', attValue, '"' );\r
},\r