mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-09-24 10:48:17 +00:00
Merge "Make rmspecials preserve whitespace"
This commit is contained in:
commit
59e2bfcaff
|
@ -1170,7 +1170,7 @@ class FilterEvaluator {
|
|||
* @return array|string
|
||||
*/
|
||||
protected function rmspecials( $s ) {
|
||||
return preg_replace( '/[^\p{L}\p{N}]/u', '', $s );
|
||||
return preg_replace( '/[^\p{L}\p{N}\s]/u', '', $s );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
rmspecials("foo;bar!") === "foobar"
|
||||
rmspecials("foo;bar!") === "foobar" &
|
||||
rmspecials("foo; bar!") === "foo bar"
|
Loading…
Reference in a new issue