mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Strip out any javascript added by application and it properly to the AJAX response
This commit is contained in:
parent
5f0ac7a70b
commit
0bba8fd032
@ -286,8 +286,16 @@ class etemplate_new extends etemplate_widget_template
|
||||
}
|
||||
error_log(__METHOD__."(,".array2string($content).')');
|
||||
error_log(' validated='.array2string($validated));
|
||||
|
||||
return ExecMethod(self::$request->method, self::complete_array_merge(self::$request->preserv, $validated));
|
||||
$content = ExecMethod(self::$request->method, self::complete_array_merge(self::$request->preserv, $validated));
|
||||
if (isset($GLOBALS['egw_info']['flags']['java_script']))
|
||||
{
|
||||
// Strip out any script tags
|
||||
$GLOBALS['egw_info']['flags']['java_script'] = preg_replace(array('/(<script[^>]*>)([^<]*)/is','/<\/script>/'),array('$2',''),$GLOBALS['egw_info']['flags']['java_script']);
|
||||
self::$response->script($GLOBALS['egw_info']['flags']['java_script']);
|
||||
error_log($app .' added javascript to $GLOBALS[egw_info][flags][java_script] - use egw_json_response->script() instead.');
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user