strip RTL from tags
This commit is contained in:
parent
bb490ac413
commit
1779f97cac
@ -1055,9 +1055,10 @@ class Tag {
|
||||
*/
|
||||
public static function sanitise($tag) {
|
||||
assert(is_string($tag));
|
||||
$tag = preg_replace("/[\s?*]/", "", $tag);
|
||||
$tag = preg_replace("/\.+/", ".", $tag);
|
||||
$tag = preg_replace("/^(\.+[\/\\\\])+/", "", $tag);
|
||||
$tag = preg_replace("/[\s?*]/", "", $tag); # whitespace
|
||||
$tag = preg_replace('/\x20(\x0e|\x0f)/', '', $tag); # unicode RTL
|
||||
$tag = preg_replace("/\.+/", ".", $tag); # strings of dots?
|
||||
$tag = preg_replace("/^(\.+[\/\\\\])+/", "", $tag); # trailing slashes?
|
||||
return $tag;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user