Correcting a few formatting issues after importing patch.

This commit is contained in:
Morten Christensen
2012-12-28 19:08:01 -01:00
parent e198f76356
commit c98d906f36
2 changed files with 5 additions and 6 deletions

View File

@@ -744,21 +744,21 @@ namespace Umbraco.Core
public static string FormatUrl(this string url)
{
string _newUrl = url;
string newUrl = url;
XmlNode replaceChars = UmbracoSettings.UrlReplaceCharacters;
foreach (XmlNode n in replaceChars.SelectNodes("char"))
{
if (n.Attributes.GetNamedItem("org") != null && n.Attributes.GetNamedItem("org").Value != "")
_newUrl = _newUrl.Replace(n.Attributes.GetNamedItem("org").Value, Umbraco.Core.XmlHelper.GetNodeValue(n));
newUrl = newUrl.Replace(n.Attributes.GetNamedItem("org").Value, XmlHelper.GetNodeValue(n));
}
// check for double dashes
if (UmbracoSettings.RemoveDoubleDashesFromUrlReplacing)
{
_newUrl = Regex.Replace(_newUrl, @"[-]{2,}", "-");
newUrl = Regex.Replace(newUrl, @"[-]{2,}", "-");
}
return _newUrl;
return newUrl;
}
}
}