When javascript is being used it breaks:
This occurs when the widgetSettings Modal form is called.
function WidgetBeginSettingsForm( & $params )
{
$params['Form']->custom_content( '<script> //some script file even if the script file is empty </script>' );
return true;
}
Request ERROR #1:
url: http://localhost/admin.php
POST data: ctrl=widgets&action=edit&wi_ID=309&nocache_dummy=1495931961898&display_mode=js
error: SyntaxError: Unexpected token <
escaping the
script
tag solves the problem: