Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.6.1
[ckeditor.git]
/
_source
/
plugins
/
bbcode
/
plugin.js
diff --git
a/_source/plugins/bbcode/plugin.js
b/_source/plugins/bbcode/plugin.js
index
69de69d
..
9ea7232
100644
(file)
--- a/
_source/plugins/bbcode/plugin.js
+++ b/
_source/plugins/bbcode/plugin.js
@@
-158,11
+158,17
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
4 : close of tag;
\r
*/
\r
\r
4 : close of tag;
\r
*/
\r
\r
- // Opening tag
\r
- if ( ( part = parts[ 1 ] ) )
\r
+ part = ( parts[ 1 ] || parts[ 3 ] || '' ).toLowerCase();
\r
+ // Unrecognized tags should be delivered as a simple text (#7860).
\r
+ if ( part && !bbcodeMap[ part ] )
\r
{
\r
{
\r
- part = part.toLowerCase();
\r
+ this.onText( parts[ 0 ] );
\r
+ continue;
\r
+ }
\r
\r
\r
+ // Opening tag
\r
+ if ( parts[ 1 ] )
\r
+ {
\r
var tagName = bbcodeMap[ part ],
\r
attribs = {},
\r
styles = {},
\r
var tagName = bbcodeMap[ part ],
\r
attribs = {},
\r
styles = {},
\r
@@
-201,7
+207,7
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
this.onTagOpen( tagName, attribs, CKEDITOR.dtd.$empty[ tagName ] );
\r
}
\r
// Closing tag
\r
this.onTagOpen( tagName, attribs, CKEDITOR.dtd.$empty[ tagName ] );
\r
}
\r
// Closing tag
\r
- else if ( ( part = parts[ 3 ] ) )
\r
+ else if ( parts[ 3 ] )
\r
this.onTagClose( bbcodeMap[ part ] );
\r
}
\r
\r
this.onTagClose( bbcodeMap[ part ] );
\r
}
\r
\r
@@
-872,8
+878,9
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
editor.dataProcessor.writer = BBCodeWriter;
\r
\r
\r
editor.dataProcessor.writer = BBCodeWriter;
\r
\r
- editor.on( 'editingBlockReady', function ()
\r
+ editor.on( 'beforeSetMode', function( evt )
\r
{
\r
{
\r
+ evt.removeListener();
\r
var wysiwyg = editor._.modes[ 'wysiwyg' ];
\r
wysiwyg.loadData = CKEDITOR.tools.override( wysiwyg.loadData, function( org )
\r
{
\r
var wysiwyg = editor._.modes[ 'wysiwyg' ];
\r
wysiwyg.loadData = CKEDITOR.tools.override( wysiwyg.loadData, function( org )
\r
{
\r