Commit 7ba70547 authored by Steven Wittens's avatar Steven Wittens

- Improved regexp for encoding extraction

parent e8265f07
......@@ -326,7 +326,7 @@ function import_refresh($feed) {
}
// extract the XML file's encoding (the XML parser in PHP4 doesn't do this by itself):
if (ereg('encoding="([^"]+)"', $data, $match)) {
if (ereg('^[^>]+encoding="([^"]+)"', $data, $match)) {
$encoding = $match[1];
}
......
......@@ -326,7 +326,7 @@ function import_refresh($feed) {
}
// extract the XML file's encoding (the XML parser in PHP4 doesn't do this by itself):
if (ereg('encoding="([^"]+)"', $data, $match)) {
if (ereg('^[^>]+encoding="([^"]+)"', $data, $match)) {
$encoding = $match[1];
}
......
......@@ -326,7 +326,7 @@ function import_refresh($feed) {
}
// extract the XML file's encoding (the XML parser in PHP4 doesn't do this by itself):
if (ereg('encoding="([^"]+)"', $data, $match)) {
if (ereg('^[^>]+encoding="([^"]+)"', $data, $match)) {
$encoding = $match[1];
}
......
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