Ticket #7860: 7860.patch

File 7860.patch, 983 bytes (added by Sa'ar Zac Elias, 13 years ago)
  • _source/plugins/bbcode/plugin.js

     
    158158                                 4 : close of tag;
    159159                                 */
    160160
     161                                part = ( parts[ 1 ] || parts[ 3 ] || '' ).toLowerCase();
     162                                // Unrecognized tags should be delivered as a simple text (#7860).
     163                                if ( part && !bbcodeMap[ part ] )
     164                                {
     165                                        this.onText( parts[ 0 ] );
     166                                        continue;
     167                                }
     168
    161169                                // Opening tag
    162                                 if ( ( part = parts[ 1 ] ) )
     170                                if ( parts[ 1 ] )
    163171                                {
    164                                         part = part.toLowerCase();
    165 
    166172                                        var tagName = bbcodeMap[ part ],
    167173                                                        attribs = {},
    168174                                                        styles = {},
     
    201207                                        this.onTagOpen( tagName, attribs, CKEDITOR.dtd.$empty[ tagName ] );
    202208                                }
    203209                                // Closing tag
    204                                 else if ( ( part = parts[ 3 ] ) )
     210                                else if ( parts[ 3 ] )
    205211                                        this.onTagClose( bbcodeMap[ part ] );
    206212                        }
    207213
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy