some urls weren't well parsed

This commit is contained in:
Nicolas Lœuillet
2013-08-08 21:13:37 +02:00
parent 301e4c5acb
commit 5f9bff0f71
2 changed files with 3 additions and 1 deletions

View File

@ -170,6 +170,7 @@ class Tools
preg_match('#charset="?(.*)"#si', $meta[0], $encoding);
# if charset is found set it otherwise, set it to utf-8
$html_charset = (!empty($encoding[1])) ? strtolower($encoding[1]) : 'utf-8';
if (empty($encoding[1])) $encoding[1] = 'utf-8';
} else {
$html_charset = 'utf-8';
$encoding[1] = '';