summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/aggregator.module2
-rw-r--r--modules/aggregator/aggregator.module2
-rw-r--r--modules/import.module2
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module
index be29a8995..c9833e5fd 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -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];
}
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index be29a8995..c9833e5fd 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -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];
}
diff --git a/modules/import.module b/modules/import.module
index be29a8995..c9833e5fd 100644
--- a/modules/import.module
+++ b/modules/import.module
@@ -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];
}