Project

General

Profile

« Previous | Next » 

Revision 491

Added by Matthias almost 17 years ago

Added changeset [490] to the branches

View differences:

frontend.functions.php
76 76
	$string = entities_to_umlauts($search_string, 'UTF-8');
77 77
	$string = strtr($string, $string_ul_umlauts);
78 78
	// do some magic to prevent < > ... from being highlighted
79
	$foo = strtr($foo, array("<"=>"!,,!", ">"=>"!,,,!", "&"=>"!,,,,!", """=>"!,,,,,!", "'"=>"!,,,,,,!"));
80
	$string = strtr($string, array("<"=>"!,,!", ">"=>"!,,,!", "&"=>"!,,,,!", """=>"!,,,,,!", "'"=>"!,,,,,,!"));
79
	$foo = strtr($foo, array("<"=>"!,,!", ">"=>"!,,,!", "&"=>"!,,,,!", """=>"!,,,,,!", "'"=>"!,,,,,,!"));
80
	$string = strtr($string, array("<"=>"!,,!", ">"=>"!,,,!", "&"=>"!,,,,!", """=>"!,,,,,!", "'"=>"!,,,,,,!"));
81 81
	$foo = preg_replace('/('.$string.')(?=[^>]*<)/iUS', '<span class="highlight">$1</span>',$foo);
82 82
	$pos = strpos($foo, '<');
83 83
	if ($pos === false) { // "===" means identicaly
84 84
		$foo = preg_replace('/('.$string.')/i', '<span class="highlight">$1</span>',$foo);
85 85
	}
86
	$foo = strtr($foo, array("!,,!"=>"&lt;", "!,,,!"=>"&gt;", "!,,,,!"=>"&amp;", "!,,,,,!"=>"&quot;", "!,,,,,,!"=>"&#039;"));
86
	$foo = strtr($foo, array("!,,!"=>"&lt;", "!,,,!"=>"&gt;", "!,,,,!"=>"&amp;", "!,,,,,!"=>"&quot;", "!,,,,,,!"=>"&#39;"));
87 87
	if(DEFAULT_CHARSET != 'utf-8') {
88 88
		$foo = umlauts_to_defcharset($foo, 'UTF-8');
89 89
	}

Also available in: Unified diff