Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 660)
+++ trunk/CHANGELOG	(revision 661)
@@ -14,6 +14,7 @@
 02-Feb-2008 Christian Sommer
 #	fixed wrong redirect in /admin/images
 02-Feb-2008 Thomas Hornik
+!	search will show email-addresses, even if email-filter is activated (on page with highlighting). Fixed.
 +	Added missing text in languages files for jscalendar
 !	settings: pages-directory '/' will be converted to '' (empty string) on save.
 !	changed last remaining call to my_htmlspecialchars() to htmlspecialchars()
Index: trunk/wb/framework/frontend.functions.php
===================================================================
--- trunk/wb/framework/frontend.functions.php	(revision 660)
+++ trunk/wb/framework/frontend.functions.php	(revision 661)
@@ -82,13 +82,13 @@
 	
 	// the highlighting
 	// match $string, but not inside <style>...</style>, <script>...</script>, <!--...--> or HTML-Tags
-	// split $string into pieces - "cut away" styles, scripts, comments, and HTML-tags
-	$matches = preg_split("/(<style.*<\/style>|<script.*<\/script>|<!--.*-->|<.*>)/iUs",$foo,-1,(PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY));
+	// split $string into pieces - "cut away" styles, scripts, comments, HTML-tags and eMail-addresses
+	$matches = preg_split("/(<style.*<\/style>|<script.*<\/script>|<!--.*-->|<.*>|\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)/iUs",$foo,-1,(PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY));
 	if(is_array($matches) && $matches != array()) {
 		$foo = "";
 		$string = strtr($string, array('&lt;'=>'<', '&gt;'=>'>', '&amp;'=>'&', '&quot;'=>'"', '&#39;'=>'\'', '&nbsp;'=>"\xC2\xA0"));
 		foreach($matches as $match) {
-			if($match{0}!="<") {
+			if($match{0}!="<" && !preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $match)) {
 				$match = strtr($match, array('&lt;'=>'<', '&gt;'=>'>', '&amp;'=>'&', '&quot;'=>'"', '&#39;'=>'\'', '&nbsp;'=>"\xC2\xA0"));
 				$match = preg_replace('/('.$string.')/iS', '_span class=_highlight__$1_/span_',$match);
 				$match = strtr($match, array('<'=>'&lt;', '>'=>'&gt;', '&'=>'&amp;', '"'=>'&quot;', '\''=>'&#39;', "\xC2\xA0"=>'&nbsp;'));
