public ActionResult List(CardListModel model) { for(int i = 0; i < model.Item.Count; i++) { model.Item[i] = HttpUtility.HtmlDecode(model.Item[i]); } model.LeftFooter = HttpUtility.HtmlDecode(model.LeftFooter); model.RightFooter = HttpUtility.HtmlDecode(model.RightFooter); return PartialView(model); }
public ActionResult List(string encrypted) { encrypted = Helpers.XOR.Decrypt(encrypted, Helpers.Constants.XORAppKey); string scriptURL = HttpUtility.UrlDecode(encrypted); CardListModel model = new CardListModel(); try { using (var client = new WebClient()) { string json = @client.DownloadString(scriptURL); JObject cardInfo = JObject.Parse(json); string cardType = cardInfo["type"].ToString(); if (cardType.ToLower() == "list") { model = cardInfo["parameters"].ToObject<CardListModel>(); return PartialView(model); } else { return RedirectToAction("Error"); } } } catch { return RedirectToAction("Error"); } }