mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Improve escape_css() to accept most common CSS expressions
This commit is contained in:
parent
62eb6b2aae
commit
baadb36e37
2 changed files with 4 additions and 2 deletions
|
|
@ -205,7 +205,7 @@ function escape($str, bool $double_escape = true, bool $except_lang_code = false
|
|||
*/
|
||||
function escape_css(string $str): string
|
||||
{
|
||||
return preg_replace('/[^a-zA-Z0-9_.#\/-]/', '', (string)$str);
|
||||
return preg_replace('/[^a-zA-Z0-9_.,#%\/\'()\x20-]/', '', (string)$str);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue