Skip to content

Commit

Permalink
ThePixelDeveloper#53 - wrong sitemap-image namespace (ThePixelDevelop…
Browse files Browse the repository at this point in the history
…er#54)

* ThePixelDeveloper#53 - wrong sitemap-image namespace

* Update test
  • Loading branch information
nucreativa authored and ThePixelDeveloper committed Oct 2, 2017
1 parent 7dd4951 commit 6506391
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/OutputSpec.php
Expand Up @@ -43,7 +43,7 @@ function it_should_generate_a_sitemap_of_images()
{
$xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="https://www.google.com/schemas/sitemap-image/1.1">
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://www.example.com/1</loc>
<image:image>
Expand Down
2 changes: 1 addition & 1 deletion src/Subelements/Image.php
Expand Up @@ -197,6 +197,6 @@ public function setLicense($license)
*/
public function appendAttributeToCollectionXML(XMLWriter $XMLWriter)
{
$XMLWriter->writeAttribute('xmlns:image', 'https://www.google.com/schemas/sitemap-image/1.1');
$XMLWriter->writeAttribute('xmlns:image', 'http://www.google.com/schemas/sitemap-image/1.1');
}
}

0 comments on commit 6506391

Please sign in to comment.