Due to the fact that the URLS are not HTML sanitized, Google will reject the sitemaps if they do have HTML unescaped characters in them.
You simply need to adapt the script to sanitize the URLs further.
At line 384, change:
$entry = $this->fileEntry( $title->getCanonicalURL(), $date, $this->priority( $namespace ) );
to:
$entry = $this->fileEntry( encodeURL($title->getCanonicalURL()), $date, $this->priority( $namespace ) );
$title = htmlentities($title);
Before the private function open, around line 424, add:
private function encodeUrl($url) { return str_replace(array('(',')','$','&','\,'@','*','#'),array('%28','%29','%24','%26','%27','%40','%2A','%23'), $url);
//return $url;
}
This will sanitize to match official sitemap rules.
Your generator FAILS the tests without this code, especially if someone enters special characters in a wiki title, like a dollar sign, an asterisk, or parentheses/apostrophes.