/*\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
this.lineBreak( 1 );\r
\r
this.write( '[', tag );\r
- var option = attributes.option;\r
- option && this.write( '=', option );\r
- this.write( ']' );\r
+ }\r
+ },\r
\r
+ openTagClose : function( tag )\r
+ {\r
+\r
+ if ( tag == 'br' )\r
+ this._.output.push( '\n' );\r
+ else if ( tag in bbcodeMap )\r
+ {\r
+ this.write( ']' );\r
if ( this.getRule( tag, 'breakAfterOpen' ) )\r
this.lineBreak( 1 );\r
}\r
- else if ( tag == 'br' )\r
- this._.output.push( '\n' );\r
},\r
\r
- openTagClose : function() { },\r
- attribute : function() { },\r
+ attribute : function( name, val )\r
+ {\r
+ if ( name == 'option' )\r
+ {\r
+ // Force simply ampersand in attributes.\r
+ if ( typeof val == 'string' )\r
+ val = val.replace( /&/g, '&' );\r
+\r
+ this.write( '=', val );\r
+ }\r
+ },\r
\r
closeTag : function( tag )\r
{\r