Describe the bug
German umlauts not correctly encoded in loc URLS.
To reproduce
Steps to reproduce the behaviour:
- Go to our blog-3-sitemap.xml
- Search for prediger-zu-besuch-bei-sattler and check the URL in
<image:loc>
- See that it contains
Körner
Expected behaviour
To avoid confusion and parsing errors, german umlauts should be % encoded in all sitemap URLs.
Technical details
In the file helpers/Sitemap.php:592 $asset->getUrl() already returns the correctly encoded URL for the asset which gets run through UrlHelper::absoluteUrlWithProtocol() which in turns calls TextHelper::sanitizeUserInput() down the line and rawurldecode's the URL again in helpers/Text.php:340. That removes the % encoding again.
Screenshots
Versions
- Plugin version: dev-develop-v5 as 5.1.13
- Craft version: 5.8.15
Describe the bug
German umlauts not correctly encoded in
locURLS.To reproduce
Steps to reproduce the behaviour:
<image:loc>KörnerExpected behaviour
To avoid confusion and parsing errors, german umlauts should be % encoded in all sitemap URLs.
Technical details
In the file
helpers/Sitemap.php:592$asset->getUrl() already returns the correctly encoded URL for the asset which gets run throughUrlHelper::absoluteUrlWithProtocol()which in turns callsTextHelper::sanitizeUserInput()down the line and rawurldecode's the URL again inhelpers/Text.php:340. That removes the % encoding again.Screenshots
Versions