--- /Users/oli/cms + webshop/Backup_cms/drupal_backup/lingostiny/lingostinyP/online/files/www/lingostiny-produktiv/sites/all/modules/xmlsitemap/xmlsitemap.module
+++ xmlsitemap.module
@@ -693,6 +693,10 @@
  * @return The fully formatted URL
  */
 function xmlsitemap_url($path = NULL, $alias = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
+	if(module_exists('pathauto')){
+		$pathauto_path = drupal_get_path('module', 'pathauto');
+  	require_once("$pathauto_path/pathauto.inc");
+	}
   if (isset($fragment)) {
     $fragment = "#$fragment";
   }
@@ -717,6 +721,7 @@
   $base = ($absolute ? $base_url .'/' : base_path());
   if (!empty($path) && $path != '<front>') {
     $path = _xmlsitemap_get_path_alias($path, $alias);
+		$path = $pathauto_path ? pathauto_cleanstring($path, FALSE) : $path;
     $path = drupal_urlencode($path);
     if (!$clean_url) {
       if (isset($query)) {
