Merge pull request #7682 from owncloud/sanitize-fallbackid-master

sanitize fallbackId
This commit is contained in:
Lukas Reschke 2014-03-12 09:22:46 +01:00
commit 942d5fcff3
1 changed files with 2 additions and 1 deletions

View File

@ -63,8 +63,9 @@ class OC_EventSource{
$type=null;
}
if($this->fallback) {
$fallBackId = OC_Util::sanitizeHTML($this->fallBackId);
$response='<script type="text/javascript">window.parent.OC.EventSource.fallBackCallBack('
.$this->fallBackId.',"' . $type . '",' . OCP\JSON::encode($data) . ')</script>' . PHP_EOL;
.$fallBackId.',"' . $type . '",' . OCP\JSON::encode($data) . ')</script>' . PHP_EOL;
echo $response;
}else{
if($type) {