Hi all!
Debian 12
Openfire 5.0.2
Java 17.0.16
Content Filter plugin 1.9.0
An external problem in word processing in Russian (cyrillic) patterns.
Regular expression (?i) case insensitive does not work.
For example, if you ask (?i)привет, you will find “привет”, but “Привет” or “ПРИВЕТ” or “приВЕт”, etc. does not detect.
How can this be fixed?
Thank you!
Hi, thanks for bringing this up.
I think the issue with this is in Java’s implementation of regular expression patterns. By default, case-insensitive matching (using ?i) assumes that only characters in the US-ASCII charset are being matched. Try combining it with enabling unicode-aware case folding (?u).
In any case, I believe that it should be easier to configure this in the plugin. I have created a new issue to allow for easier case sensitivity configuration: Case sensitivity · Issue #26 · igniterealtime/openfire-contentFilter-plugin · GitHub. This feature will be available in a future version of the plugin.
Thanks!
I checked just now. This works: (?i)(?u)
Cyrillic words from the template now work correctly!
Thanks again.
Dear Guus!
Please pass this request on to the plugin developers.
Add the output of the found word from the template pattern in the message to the administrator. See the screenshot for an example.
Thank!!!
That issue has been recorded as Content Filter filters a notification to admin with the original packet included · Issue #1 · igniterealtime/openfire-contentFilter-plugin · GitHub
It turns out that this bug hasn’t been fixed yet?
Correct. Some work was started, but has not been completed yet.
Okay, thanks, we’ll wait for the developers to fix it.
