Closed (fixed)
Project:
Wordfilter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Issue tags:
Reporter:
Created:
26 Apr 2010 at 03:12 UTC
Updated:
15 Apr 2014 at 20:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jaydub commentedI don't have time to work on this myself at this time. Depending on whether you feel comfortable patching your local version of the module you could likely get what you want by passing a parameter to the preg_replace() PHP function call that will enable case sensitivity. If you are comfortable editing your module source let me know and I'll describe what -should- in theory allow case sensitivity to work.
Comment #2
jaydub commentedI'll look at adding this as a new feature for the D7 version of the module and down the line if it's possible to backport the changes to d6.
Comment #3
jaydub commentedComment #4
jaydub commentedComment #5
David Latapie commentedThanks jaydub. I won't feel comfortable patching anything, since I neither nor want to learn how to write PHP. I hope someone else will!
Comment #6
Michsk commentedjaydub, i do feel comfortable. Could you describe it a bit more.
Comment #7
jaydub commentedby default the case insensitive flag is sent to the PHP regular expression function used in wordfilter. If you have any familiarity with regular expressions, the flag used is 'i'. You might see a typical regex like this:
With the 'i' at the end of the expression '/foo/bar/i' then any of these strings would be replaced:
FOO -> bar
Foo -> bar
fOO -> bar
and so on.
If you want to patch the module yourself to remove case sensitvity, look for the functions preg_quote() and preg_split() and where you see 'i' as in '/i' you can just remove the 'i'.
Comment #8
anonymous07 commentedSubscribe
Comment #9
Michsk commentedi am extremley bussy finishing up a project, so i wont have time atm to try this.
Comment #10
hedac commentedthank you. removing the i in preg_quote and preg_split functions works perfectly.
Comment #11
David_Rothstein commentedHm, this issue was postponed (so I didn't see it) but I just posted a D7 patch for this at #2045243: Allow word filtering to be case-sensitive. We could merge the two issues...
Comment #12
jaydub commentedComment #13
jaydub commentedFor now I've done a simple implementation that sets a global for case sensitiveness in the admin settings. A later update can include the option of setting case sensitive per configured search word/replacement word as can be done with the standalone setting. But that will require DB schema changes so for now, offering this up as a solution for those that can use it as a global.
Comment #15
jaydub commentedMarking this as fixed, will open a new ticket later if time permits to make case sensitiveness a per search word/replacement word option.