diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index bc3baeb..84e6a04 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -74,8 +74,7 @@
 		 */
 		if ($this->allow_js_event_handlers == FALSE)
 		{
-			$event_handlers = array('[^a-z_\-]on\w*','xmlns');
-			$str = preg_replace("#<([^><]+?)(".implode('|', $event_handlers).")(\s*=\s*[^><]*)([><]*)#i", "<\\1\\4", $str);
+			$str = preg_replace("#<([^><]+?)([^a-z_\-]on\w*|xmlns)(\s*=\s*[^><]*)([><]*)#i", "<\\1\\4", $str);
  		}       
 
 		/*