mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Merge pull request #1070 from cgx/fix/escape
Add backslashes before characters that need to be escaped
This commit is contained in:
commit
102ca6b53b
@ -41,7 +41,7 @@ class HClientScript extends CClientScript
|
||||
public function setJavascriptVariable($name, $value)
|
||||
{
|
||||
|
||||
$jsCode = "var " . $name . " = '" . $value . "';\n";
|
||||
$jsCode = "var " . $name . " = '" . addslashes($value) . "';\n";
|
||||
$this->registerScript('jsVar_' . $name, $jsCode, CClientScript::POS_BEGIN);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user