From 1d394b8a177683d23b2574cd1be722123cf21cb2 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Fri, 21 Mar 2014 18:49:11 +0100 Subject: [PATCH] Fix < loc > URLs generation for URLs with '&' To Convert special characters, especially the **&** found in OSClass search URLs, to HTML entities --- sitemap_generator/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sitemap_generator/index.php b/sitemap_generator/index.php index 1a64802..0feabb1 100755 --- a/sitemap_generator/index.php +++ b/sitemap_generator/index.php @@ -107,7 +107,7 @@ function sitemap_add_url($url = '', $date = '', $freq = 'daily') { $filename = osc_base_path() . 'sitemap.xml'; $xml = ' ' . PHP_EOL; - $xml .= ' ' . htmlentities($url, ENT_QUOTES, "UTF-8") . '' . PHP_EOL; + $xml .= ' ' . htmlspecialchars($url, ENT_QUOTES, "UTF-8") . '' . PHP_EOL; $xml .= ' ' . $date . '' . PHP_EOL; $xml .= ' ' . $freq . '' . PHP_EOL; $xml .= ' ' . PHP_EOL;