From fc1207584a58192ed28c29368ae71f7ba110052d Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 9 Jun 2003 03:00:23 +0000 Subject: [PATCH] Better way of stripping Javascript using regular expressions --- lib/weblib.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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 = "