Project

General

Profile

« Previous | Next » 

Revision 668

Added by thorn almost 17 years ago

email-addresses are excluded from search-results page

View differences:

search_modext.php
235 235
	// prepare the text (part 1): remove lf and cr, convert \" to ", remove comments, style, scripting and unnecessary whitespace, convert to utf8
236 236
	$mod_text = strtr($mod_text, array("\x0D\x0A" => ' ', "\x0D" => ' ', "\x0A" => ' ', '\"' => '"'));
237 237
	$mod_text = preg_replace('/(<!--.*?-->|<style.*?<\/style>|<script.*?<\/script>|\s+)/i', ' ', $mod_text);
238
	// remove email-addresses
239
	$mod_text = preg_replace('/\b[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}\b/', ' ', $mod_text);
238 240
	$mod_text = entities_to_umlauts($mod_text, 'UTF-8');
239 241

  
240 242
	// make the link from $mod_page_link, add target

Also available in: Unified diff