Details
-
Wish
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
WordUtils.containsAllWords() checks if the String contains all words in the given array.
Surprisingly, it interprets the words to be searched for as regular expressions, so for example searching for ")" would throw a PatternSyntaxException. Nothing in the javadoc nor the testcases suggests this is intentional.
We could fix this by applying "Pattern.quote()" to the parameters, or by rejecting non-word characters outright.