The UTF-8 regex can occasionally fail on very low memory machines. Reduce the amount of memory it uses.
See #32204. git-svn-id: https://develop.svn.wordpress.org/trunk@32375 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ed53ad2c53
commit
ba24459a63
@ -1218,7 +1218,7 @@ function wp_sanitize_redirect($location) {
|
||||
| \xF0[\x90-\xBF][\x80-\xBF]{2} # four-byte sequences 11110xxx 10xxxxxx * 3
|
||||
| [\xF1-\xF3][\x80-\xBF]{3}
|
||||
| \xF4[\x80-\x8F][\x80-\xBF]{2}
|
||||
){1,50} # ...one or more times
|
||||
){1,40} # ...one or more times
|
||||
)/x';
|
||||
$location = preg_replace_callback( $regex, '_wp_sanitize_utf8_in_redirect', $location );
|
||||
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]()]|i', '', $location);
|
||||
|
@ -2654,7 +2654,7 @@ class wpdb {
|
||||
';
|
||||
}
|
||||
|
||||
$regex .= '){1,50} # ...one or more times
|
||||
$regex .= '){1,40} # ...one or more times
|
||||
)
|
||||
| . # anything else
|
||||
/x';
|
||||
|
Loading…
Reference in New Issue
Block a user