public ActionResult PostLiteralConfig(LiteralConfigModel m) { if (string.IsNullOrEmpty(m.Html)) ModelState.AddModelError("html", "You must supply some html to literally include into the output."); if (ModelState.IsValid) { var appSvc = AppServiceRepository.GetService(); var include = appSvc.GetInclude<LiteralInclude>(m.IncludePath); include.Html = m.Html; AppServiceRepository.UpdateService(appSvc); return Json(new { success = true, includePath = m.IncludePath }); } return PartialView("WidgetLiteralConfig", m); }
public PartialViewResult LiteralConfig(LiteralConfigModel m) { var include = AppService.GetInclude<LiteralInclude>(m.IncludePath); m.Html = HttpUtility.HtmlDecode(include.Html); //needs decoded or it gets double encoded return PartialView("WidgetLiteralConfig", m); }