Replacing quotes in a html input
问题 I've got some strings coming through a Model and am making html inputs from them. More or less as below: @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic> @{ this.Layout = "Views/Shared/Bootstrap.cshtml"; } <input id="ModelDescription" type="hidden" value='@if(this.Model.Model.Description != null) { @this.Model.Model.Description.Replace('a','b') } ' /> Which is all well and good. I've managed to get the replace a with b in there (the code I've inherited isn't the most stable of