MDL-37015 Resource: link in onclick should not contain html special char

This commit is contained in:
Rajesh Taneja
2012-12-20 10:26:29 +08:00
parent 4c7e6ea021
commit a1ccc146ac
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1922,7 +1922,7 @@ class global_navigation extends navigation_node {
$propogrationhandler = 'e.halt();';
}
// Decode the onclick - it has already been encoded for display (puke)
$onclick = htmlspecialchars_decode($activity->onclick);
$onclick = htmlspecialchars_decode($activity->onclick, ENT_QUOTES);
// Build the JS function the click event will call
$jscode = "function {$functionname}(e) { $propogrationhandler $onclick }";
$this->page->requires->js_init_code($jscode);