mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Remove question marks, equal signs and hashes
Those were not removed if multibyte was allowed.
This commit is contained in:
parent
cf8e9f2427
commit
bc9aa09b1f
@ -32,7 +32,7 @@ class URLSegmentFilter extends Object {
|
||||
'/\s|\+/u' => '-', // remove whitespace/plus
|
||||
'/[_.]+/u' => '-', // underscores and dots to dashes
|
||||
'/[^A-Za-z0-9\-]+/u' => '', // remove non-ASCII chars, only allow alphanumeric and dashes
|
||||
'/\/+/u' => '-', // remove forward slashes in case multibyte is allowed (and ASCII chars aren't removed)
|
||||
'/[\/\?=#]+/u' => '-', // remove forward slashes, question marks, equal signs and hashes in case multibyte is allowed (and non-ASCII chars aren't removed)
|
||||
'/[\-]{2,}/u' => '-', // remove duplicate dashes
|
||||
'/^[\-]+/u' => '', // Remove all leading dashes
|
||||
'/[\-]+$/u' => '' // Remove all trailing dashes
|
||||
|
Loading…
Reference in New Issue
Block a user