From b25dfd0913f2ca5666124740c30156fa0a6abaef Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 23 Jun 2010 05:55:08 -0400
Subject: [PATCH] - removed PHP closing tag

---
 program/include/main.inc |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/program/include/main.inc b/program/include/main.inc
index cd53854..8b8a7d2 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -830,6 +830,9 @@
   if (preg_match('/expression|behavior|url\(|import/', $stripped))
     return '/* evil! */';
 
+  // remove css comments (sometimes used for some ugly hacks)
+  $source = preg_replace('!/\*(.+)\*/!Ums', '', $source);
+
   // cut out all contents between { and }
   while (($pos = strpos($source, '{', $last_pos)) && ($pos2 = strpos($source, '}', $pos)))
   {
@@ -837,7 +840,7 @@
     $source = substr($source, 0, $pos+1) . $replacements->get_replacement($key) . substr($source, $pos2, strlen($source)-$pos2);
     $last_pos = $pos+2;
   }
-  
+
   // remove html comments and add #container to each tag selector.
   // also replace body definition because we also stripped off the <body> tag
   $styles = preg_replace(
@@ -1583,7 +1586,7 @@
   // from PEAR::Validate
   $regexp = '&^(?:
 	("\s*(?:[^"\f\n\r\t\v\b\s]+\s*)+")| 			 	#1 quoted name
-	([-\w!\#\$%\&\'*+~/^`|{}]+(?:\.[-\w!\#\$%\&\'*+~/^`|{}]+)*)) 	#2 OR dot-atom
+	([-\w!\#\$%\&\'*+~/^`|{}=]+(?:\.[-\w!\#\$%\&\'*+~/^`|{}=]+)*)) 	#2 OR dot-atom (RFC5322)
 	$&xi';
 
   if (!preg_match($regexp, $local_part))
@@ -1727,4 +1730,3 @@
     }
 }
 
-?>

--
Gitblit v1.9.1