Project

General

Profile

« Previous | Next » 

Revision 463

Added by Matthias almost 17 years ago

Added changeset [460] and [461] to branches/2.6.x

View differences:

frontend.functions.php
77 77
		$string = preg_quote($string, '/');
78 78
		$string = strtr($string, $string_ul_umlauts);
79 79
		$foo = preg_replace('/('.$string.')(?=[^>]*<)/iUS', '<span class="highlight">$1</span>',$foo);
80
		$pos = strpos($foo, '<');
81
		if ($pos === false) { // "===" means identicaly
82
			$foo = preg_replace('/('.$string.')/i', '<span class="highlight">$1</span>',$foo);
83
		}
80 84
	}
81 85
	$foo = umlauts_to_entities($foo, 'UTF-8', 0);
82 86
	return $foo;

Also available in: Unified diff