Fixes: U4-1769 Dictionary Item with "Illigal" character can not be deleted

This commit is contained in:
Sebastiaan Janssen
2013-02-22 14:15:22 -01:00
parent 7a47d63b48
commit 8cf9c1ba97

View File

@@ -359,7 +359,7 @@ namespace umbraco.cms.businesslogic
Item.removeText(UniqueId);
// remove key from database
SqlHelper.ExecuteNonQuery("delete from cmsDictionary where [key] ='" + key + "'");
SqlHelper.ExecuteNonQuery("delete from cmsDictionary where [key] = @key", SqlHelper.CreateParameter("@key", key));
// Remove key from cache
DictionaryItems.Remove(key);