mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Make _v2_escape() more lenient about types
This commit is contained in:
parent
ba74b47a29
commit
fc2bdd7253
1 changed files with 3 additions and 3 deletions
|
|
@ -961,12 +961,12 @@ class Template
|
|||
* @param string $str
|
||||
* @return string
|
||||
*/
|
||||
protected function _v2_escape(string $str): string
|
||||
protected function _v2_escape($str): string
|
||||
{
|
||||
switch ($this->config->context)
|
||||
{
|
||||
case 'JS': return escape_js($str);
|
||||
default: return escape($str);
|
||||
case 'JS': return escape_js(strval($str));
|
||||
default: return escape(strval($str));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue