This makes tweeper more forgiving when it is passed URLs either with or
without the "www" subdomain for the same host.
return NULL;
}
- $xsltProcessor = $this->load_stylesheet($url["host"]);
+ // Strip the leading www. to be more forgiving on input URLs
+ $host = preg_replace('/^www\./', '', $url["host"]);
+
+ $xsltProcessor = $this->load_stylesheet($host);
if (NULL === $xsltProcessor) {
return NULL;
}
return NULL;
}
- $xmlDoc = $this->html_to_xml($html, $url["host"]);
+ $xmlDoc = $this->html_to_xml($html, $host);
if (NULL === $xmlDoc) {
return NULL;
}