mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 08:42:15 +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
|
* @param string $str
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function _v2_escape(string $str): string
|
protected function _v2_escape($str): string
|
||||||
{
|
{
|
||||||
switch ($this->config->context)
|
switch ($this->config->context)
|
||||||
{
|
{
|
||||||
case 'JS': return escape_js($str);
|
case 'JS': return escape_js(strval($str));
|
||||||
default: return escape($str);
|
default: return escape(strval($str));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue