Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 679)
+++ trunk/CHANGELOG	(revision 680)
@@ -10,8 +10,10 @@
 # = Bugfix
 ! = Update/Change
 
-------------------------------------- 2.7.0 -------------------------------------
-09-Feb-2008
+------------------------------------- 2.7.0 -------------------------------------
+09-Feb-2008 Christian Sommer
+!	output_filter: added word boundary for the mailto regex part
+09-Feb-2008 Thomas Hornwik
 !	jsadmin: added latest changes from swen, fixes most (or all?) issues.
 08-Feb-2008 Matthias Gallas
 +	added kewyword id to all new files
@@ -18,8 +20,8 @@
 08-Feb-2008 Christian Sommer
 -	Removed admin module mail_filter
 +	Added revised version of the output filter module
-08-Feb-2008 Thomas Hornik
-!	module news: set focus on captcha-field if user have to re-enter captcha
+08-Feb-2008 Thomas Hornik
+!	module news: set focus on captcha-field if user have to re-enter captcha
 !	Changed maxlength of captcha-fields - don't tell the bots how many chars we want to have.
 -	Removed unused function is_access_denied() from search
 04-Feb-2008 Thomas Hornik
Index: trunk/wb/modules/output_filter/filter-routines.php
===================================================================
--- trunk/wb/modules/output_filter/filter-routines.php	(revision 679)
+++ trunk/wb/modules/output_filter/filter-routines.php	(revision 680)
@@ -89,15 +89,15 @@
 		define('OUTPUT_FILTER_DOT_REPLACEMENT', $filter_settings['dot_replacement']);
 		
 		// first search part to find all mailto email addresses
-		$pattern = '#(<a.*?href\s*?=\s*?"\s*?mailto\s*?:\s*?)([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})([^"]*?)"([^>]*>)(.*?)</a>';
+		$pattern = '#\b(<a.*?href\s*?=\s*?"\s*?mailto\s*?:\s*?)([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})([^"]*?)"([^>]*>)(.*?)</a>\b';
 		// second part to find all non mailto email addresses
 		$pattern .= '|\b([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})\b#i';
 		/*
-		Sub 1:(<a.*?href\s*?=\s*?"\s*?mailto\s*?:\s*?)					-->	"<a id="yyy" class="xxx" href = " mailto :" ignoring white spaces
+		Sub 1:\b(<a.*?href\s*?=\s*?"\s*?mailto\s*?:\s*?)				-->	"<a id="yyy" class="xxx" href = " mailto :" ignoring white spaces
 		Sub 2:([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})			-->	the email address in the mailto: part of the mail link
 		Sub 3:([^"]*?)"																					--> possible ?Subject&cc... stuff attached to the mail address
 		Sub 4:([^>]*>)																					--> all class or id statements after the mailto but before closing ..>
-		Sub 5:(.*?)</a>																					--> the mailto text; all characters between >xxxxx</a>
+		Sub 5:(.*?)</a>\b																				--> the mailto text; all characters between >xxxxx</a>
 		Sub 6:|\b([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})\b	--> email addresses which may appear in the text (require word boundaries)
 		*/
 			
