Revision 483
Added by Matthias over 18 years ago
| frontend.functions.php | ||
|---|---|---|
| 75 | 75 |
$search_string = implode("|", $arr_string);
|
| 76 | 76 |
$string = entities_to_umlauts($search_string, 'UTF-8'); |
| 77 | 77 |
$string = strtr($string, $string_ul_umlauts); |
| 78 |
// do some magic to prevent < > ... from being highlighted |
|
| 78 | 79 |
$foo = strtr($foo, array("<"=>"!,,!", ">"=>"!,,,!", "&"=>"!,,,,!", """=>"!,,,,,!", "'"=>"!,,,,,,!"));
|
| 79 | 80 |
$string = strtr($string, array("<"=>"!,,!", ">"=>"!,,,!", "&"=>"!,,,,!", """=>"!,,,,,!", "'"=>"!,,,,,,!"));
|
| 80 | 81 |
$foo = preg_replace('/('.$string.')(?=[^>]*<)/iUS', '<span class="highlight">$1</span>',$foo);
|
| ... | ... | |
| 84 | 85 |
} |
| 85 | 86 |
$foo = strtr($foo, array("!,,!"=>"<", "!,,,!"=>">", "!,,,,!"=>"&", "!,,,,,!"=>""", "!,,,,,,!"=>"'"));
|
| 86 | 87 |
if(DEFAULT_CHARSET != 'utf-8') {
|
| 87 |
$foo = mb_convert_encoding_wrapper($foo, DEFAULT_CHARSET, 'UTF-8'); |
|
| 88 |
//$foo = umlauts_to_entities($foo, 'UTF-8'); |
|
| 88 |
$foo = umlauts_to_defcharset($foo, 'UTF-8'); |
|
| 89 | 89 |
} |
| 90 | 90 |
return $foo; |
| 91 | 91 |
} |
Also available in: Unified diff
Added changeset [482] to the branches