Closed (duplicate)
Project:
Wordfilter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2011 at 17:19 UTC
Updated:
4 Oct 2011 at 12:44 UTC
If you test the phrase 'Hello hello hello hello hello hello', only ever other word is matched.
Comments
Comment #1
q0rban commentedComment #2
q0rban commentedSheesh.
Comment #3
dunx commentedSame with 6-1.1. Should I raise a new issue?
Comment #4
yngens commentedsame issue here with 6.x-1.x-dev. subscribe.
Comment #5
csavio commentedI believe the problem is the $word->standalone pattern in the wordfilter_filter_process function. I think you could use word boundaries (\b) instead of trying to back-reference negated characters (\W) and it seems to work much better.
Then your replacements become simpler as well
Unless I'm missing something this seems to resolve the problem for me.
Comment #6
q0rban commentedI'm closing this in favor of #883940: Standalone doesn't count for first/last word of sentence or word repetition. I know, I'm the one that created this issue, but the patch there resolves both, so I'm going to retitle it.