You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a post with a URL like, let's say, something-&-some-other-thing, the generated XML for the sitemaps is invalid because the & is not converted to its valid XML-safe equivalent %26 (or &, that should work here too).
It seems to be normal since the URL is directly injected in the XML without any conversion. See for example:
I suppose a quick fix might be to use htmlentities($p->url, ENT_XML1, 'UTF-8') instead.
A more robust way would be to rewrite the sitemaps generation and use a XML library instead of building it from text blocks, but that's a whole different scope.
I don't have the time to propose a fully-tested PR for now, but I'll take a look if I can.
The text was updated successfully, but these errors were encountered:
If you have a post with a URL like, let's say,
something-&-some-other-thing
, the generated XML for the sitemaps is invalid because the&
is not converted to its valid XML-safe equivalent%26
(or&
, that should work here too).It seems to be normal since the URL is directly injected in the XML without any conversion. See for example:
htmly/system/includes/functions.php
Line 2514 in 53db3bd
I suppose a quick fix might be to use
htmlentities($p->url, ENT_XML1, 'UTF-8')
instead.A more robust way would be to rewrite the sitemaps generation and use a XML library instead of building it from text blocks, but that's a whole different scope.
I don't have the time to propose a fully-tested PR for now, but I'll take a look if I can.
The text was updated successfully, but these errors were encountered: