Closed GoogleCodeExporter closed 8 years ago
I don't believe matching whether or not there are spaces is a complete
solution. Consider a word that is encased in parentheses.
To get around this issue I left the regular expression alone and instead padded
the variable "html" on line 97 with spaces and then removed them after the
replace function finished. This may not be 100% correct either but it does
catch words that are encased in characters like parentheses, and it does catch
the words at the start and end of the string.
Original comment by Matthew....@gmail.com
on 1 Sep 2011 at 4:54
Rather than padding the text, I added two more replace calls instead catering
for the occurrence of the replaceText in the front and the back.
html.replace(new
RegExp('([^a-zA-Z\\u00A1-\\uFFFF])('+replaceWord+')([^a-zA-Z\\u00A1-\\uFFFF])',
'g'), '$1<span class="spellcheck-word-highlight">$2</span>$3')
.replace(new RegExp('([^a-zA-Z\\u00A1-\\uFFFF])('+replaceWord+')$', 'g'),
'$1<span class="spellcheck-word-highlight">$2</span>')
.replace(new RegExp('^('+replaceWord+')([^a-zA-Z\\u00A1-\\uFFFF])', 'g'),
'<span class="spellcheck-word-highlight">$1</span>$2');
Original comment by brinley
on 3 Aug 2012 at 6:20
This issue is fixed in the latest version of the plugin, which can be found
here: https://github.com/badsyntax/jquery-spellchecker
You can test this issue here: http://jquery-spellchecker-demo/redactor.html
Original comment by willis...@gmail.com
on 2 Nov 2012 at 8:40
Woops, that link should be:
http://jquery-spellchecker.badsyntax.co/redactor.html
Original comment by willis...@gmail.com
on 2 Nov 2012 at 8:40
http://jquery-spellchecker.badsyntax.co/tinymce.html
This issue still appears here when using jquery spell checker with tinymce
Original comment by thota.v....@gmail.com
on 13 Mar 2013 at 5:11
This issue is not fixed for tinymce, when we added invalid words at begining
and ending of the text in tinymce. Please advice.
Original comment by thota.v....@gmail.com
on 13 Mar 2013 at 6:29
This issue was fixed at the time of writing. I've since introduced a regression
bug. This regression bug is fixed in the latest development version and I'm yet
to release the fix. I will set up a dev site so you can test the development
changes. I'll update this ticket..
Original comment by willis...@gmail.com
on 13 Mar 2013 at 9:54
You can test the latest version here:
http://dev.jquery-spellchecker.badsyntax.co/tinymce.html
Original comment by willis...@gmail.com
on 13 Mar 2013 at 10:09
Original issue reported on code.google.com by
gustaf...@gmail.com
on 20 Aug 2010 at 10:02