bug + patch in serendipity_event_google_sitemap for static p
Posted: Fri Sep 08, 2006 9:38 pm
There is replacement on line 297 of this plugin:
But, when the $path_quoted (serendipityHTTPPath) is only '/' and permalink in static pages also contains '/' (e.g. '/static/about-me.html') the output in sitemap.xml is 'http://www.example.com/staticabout-me.html' which is wrong.
The line should be:
to catch only the first occurence of http path.
Cheers,
Vasek
Code: Select all
$url = $serendipity['baseURL'] . preg_replace("#$path_quoted#", '', $cur['permalink']);
The line should be:
Code: Select all
$url = $serendipity['baseURL'] . preg_replace("#$path_quoted#", '', $cur['permalink'],1);to catch only the first occurence of http path.
Cheers,
Vasek