From: moodler Date: Mon, 9 Jun 2003 03:00:23 +0000 (+0000) Subject: Better way of stripping Javascript using regular expressions X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fc1207584a58192ed28c29368ae71f7ba110052d;p=moodle.git Better way of stripping Javascript using regular expressions --- diff --git a/lib/weblib.php b/lib/weblib.php index 6ac3c3d493..7775512090 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -37,10 +37,6 @@ define("FORMAT_HTML", "1"); // Plain HTML (with some tags stripped) define("FORMAT_PLAIN", "2"); // Plain text (even tags are printed in full) define("FORMAT_WIKI", "3"); // Wiki-formatted text -$JAVASCRIPT_TAGS = array("javascript:", "onclick=", "ondblclick=", "onkeydown=", "onkeypress=", "onkeyup=", - "onmouseover=", "onmouseout=", "onmousedown=", "onmouseup=", "onmousemove=", - "onblur=", "onfocus=", "onload=", "onselect=", "onhelp="); - $ALLOWED_TAGS = "