JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1.1
[ckeditor.git] / _source / plugins / htmlwriter / plugin.js
index 5c4a7be..4408402 100644 (file)
@@ -171,8 +171,13 @@ CKEDITOR.htmlWriter = CKEDITOR.tools.createClass(
                 */\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