Skip to content
Snippets Groups Projects

3367705-http-to-https

2 files
+ 6
6
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
5
@@ -148,17 +148,17 @@ class XmlSitemapWriter extends \XMLWriter {
* Returns root attributes.
*/
public function getRootAttributes() {
$attributes['xmlns'] = 'http://www.sitemaps.org/schemas/sitemap/0.9';
$attributes['xmlns'] = 'https://www.sitemaps.org/schemas/sitemap/0.9';
// @todo Should content_moderation implement hook_xmlsitemap_root_attributes_alter() instead?
$attributes['xmlns:xhtml'] = 'http://www.w3.org/1999/xhtml';
if (\Drupal::state()->get('xmlsitemap_developer_mode')) {
$attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance';
$attributes['xsi:schemaLocation'] = 'http://www.sitemaps.org/schemas/sitemap/0.9';
$attributes['xmlns:xsi'] = 'https://www.w3.org/2001/XMLSchema-instance';
$attributes['xsi:schemaLocation'] = 'https://www.sitemaps.org/schemas/sitemap/0.9';
if ($this->isIndex()) {
$attributes['xsi:schemaLocation'] .= ' http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd';
$attributes['xsi:schemaLocation'] .= ' https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd';
}
else {
$attributes['xsi:schemaLocation'] .= ' http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd';
$attributes['xsi:schemaLocation'] .= ' https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd';
}
}
Loading