merge with 6.1.0

This commit is contained in:
Stephan
2013-03-31 19:19:24 -02:00
7 changed files with 265 additions and 31 deletions

View File

@@ -58,9 +58,14 @@ namespace Umbraco.Core.Strings
static void InitializeLegacyUrlReplaceCharacters()
{
var replaceChars = UmbracoSettings.UrlReplaceCharacters;
foreach (var node in replaceChars.SelectNodes("char").Cast<System.Xml.XmlNode>())
if (replaceChars == null) return;
var nodes = replaceChars.SelectNodes("char");
if (nodes == null) return;
foreach (var node in nodes.Cast<System.Xml.XmlNode>())
{
var org = node.Attributes.GetNamedItem("org");
var attributes = node.Attributes;
if (attributes == null) continue;
var org = attributes.GetNamedItem("org");
if (org != null && org.Value != "")
UrlReplaceCharacters[org.Value] = XmlHelper.GetNodeValue(node);
}