Use regular escape() for CSS contexts

This commit is contained in:
Kijin Sung 2025-03-19 11:23:42 +09:00
parent 01f34781df
commit d7cf825a7d

View file

@ -959,14 +959,12 @@ class Template
* Contextual escape function for v2.
*
* @param string $str
* @param string $type
* @return string
*/
protected function _v2_escape(string $str, string $type = ''): string
protected function _v2_escape(string $str): string
{
switch ($this->config->context)
{
case 'CSS': return escape_css($str);
case 'JS': return escape_js($str);
default: return escape($str);
}