U4-4127 Turkish culture prevents Macros embedded

This commit is contained in:
Sebastiaan Janssen
2014-04-30 19:29:32 +02:00
parent cd5581bef6
commit b0c5d16ba7
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
@@ -160,7 +161,7 @@ namespace Umbraco.Web
{
//TODO: We are doing at ToLower here because for some insane reason the UpdateMacroModel method of macro.cs
// looks for a lower case match. WTF. the whole macro concept needs to be rewritten.
macroProps.Add(i.Key.ToLower(), i.Value);
macroProps.Add(i.Key.ToLowerInvariant(), i.Value);
}
var macroControl = m.renderMacro(macroProps,
UmbracoContext.Current.PublishedContentRequest.UmbracoPage.Elements,

View File

@@ -815,9 +815,9 @@ namespace umbraco
{
foreach (MacroPropertyModel mp in Model.Properties)
{
if (attributes.ContainsKey(mp.Key.ToLower()))
if (attributes.ContainsKey(mp.Key.ToLowerInvariant()))
{
mp.Value = attributes[mp.Key.ToLower()].ToString();
mp.Value = attributes[mp.Key.ToLowerInvariant()].ToString();
}
else
{