in order to make it work on mw 1.24 that finally removed the escapeLocalURL function, on sitemap.php find:
$url = $title->escapeLocalURL();
and replace with:
$url = htmlspecialchars( $title->getLocalUrl());
that's all, enjoy.
This post was posted by Raid~mediawikiwiki, but signed as Raid.