diff --git a/xmlsitemap.xmlsitemap.inc b/xmlsitemap.xmlsitemap.inc index 2520358..00f917a 100644 --- a/xmlsitemap.xmlsitemap.inc +++ b/xmlsitemap.xmlsitemap.inc @@ -65,7 +65,10 @@ class XMLSitemapWriter extends XMLWriter { * Add the XML stylesheet to the XML page. */ public function writeXSL() { - $this->writePi('xml-stylesheet', 'type="text/xsl" href="' . url('sitemap.xsl', $this->sitemap->uri['options']) . '"'); + $url = url('sitemap.xsl', $this->sitemap->uri['options']); + $url = preg_replace("(^https?://)", "", $url ); + $url = '//' . $url; + $this->writePi('xml-stylesheet', 'type="text/xsl" href="' . $url . '"'); $this->writeRaw(PHP_EOL); }