Ticket #2158: spellerpages-patch.patch

File spellerpages-patch.patch, 1.0 KB (added by javadeveloper404, 11 years ago)

tag attribute snv source patch for wordWindow.js, writeBody.

  • editor/dialog/fck_spellerpages/spellerpages/wordWindow.js

     
    167167                                        // the word. If they are word characters we'll keep looking.
    168168                                        var before_char = wordtxt.charAt( begin_idx - 1 );
    169169                                        var after_char = wordtxt.charAt( end_idx );
     170          // handle the case where the misspelled word shows up within a tag attribute
     171          // before it shows up in the text.
     172          // (i.e. pasted text from MSWord and x:str="..." attribute, such as in table cells)
     173          var tag_open = wordtxt.lastIndexOf( "<", begin_idx );
     174          var tag_close = wordtxt.lastIndexOf( ">", begin_idx );
    170175                                } while (
    171176                                        this._isWordChar( before_char )
    172177                                        || this._isWordChar( after_char )
     178          || tag_open > tag_close
    173179                                );
    174180
    175181                                // keep track of its position in the original text.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy