Commit 1691dff0 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1230 Reverted change: Regexp faulty. Details in ticket comment.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 79a95985
......@@ -788,7 +788,7 @@ class Utils {
public static function ConvertCodepageStringToUtf8($codepage, $string) {
if (function_exists("iconv")) {
$charset = self::GetCodepageCharset($codepage);
return iconv($charset, "utf-8", preg_replace('/<head(.*)<meta (.*)?charset=([^"\']+)(.*)<\/head/i','<head$1<meta $2charset=utf-8$4</head',$string,1));
return iconv($charset, "utf-8", $string);
}
else
ZLog::Write(LOGLEVEL_WARN, "Utils::ConvertCodepageStringToUtf8() 'iconv' is not available. Charset conversion skipped.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment