Fixed case where HTML comments were getting stripped when opening tag not followed by whitespace (<!--foo--> was stripped, <!-- foo --> was not, neither is stripped now)
authorDan
Sun, 27 Jan 2008 23:43:24 -0500
changeset 450 35f9d6c93eec
parent 448 f725a16e4a20
child 451 2c6ef58e315a
Fixed case where HTML comments were getting stripped when opening tag not followed by whitespace (<!--foo--> was stripped, <!-- foo --> was not, neither is stripped now)
includes/functions.php
--- a/includes/functions.php	Sun Jan 20 23:18:03 2008 -0500
+++ b/includes/functions.php	Sun Jan 27 23:43:24 2008 -0500
@@ -1791,7 +1791,7 @@
       // Debugging message
       // echo htmlspecialchars($full_tag) . '<br />';
 
-      if ( !in_array($tag_name, $tag_whitelist) )
+      if ( !in_array($tag_name, $tag_whitelist) && substr($tag_name, 0, 3) != '!--' )
       {
         // Illegal tag
         //echo $tag_name . ' ';