title: ASP MVC Razor encode special characters in input placeholder
body: <p>This is my code:</p>
  
  <p>Model:</p>
  
  <pre><code>[Required]
  [DataType(DataType.Text)]
  [Display(Name = "Your company's name")]
  public string CompanyName { get; set; }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.CompanyName, new { @class = "account-input", @placeholder = @Html.DisplayNameFor(m =&gt; m.CompanyName), @id = "companyname" })
  </code></pre>
  
  <p>It will be rendered like this:</p>
  
  <blockquote>
    <p>Your company&amp;#39;s name</p>
  </blockquote>
  
  <p>html output:</p>
  
  <pre><code>&lt;input class="account-input" data-val="true" data-val-required="The Your company's name field is required." id="companyname" name="CompanyName" placeholder="Your company&amp;amp;#39;s name" type="text" value=""&gt;
  </code></pre>
  
  <p>It should be look like this: </p>
  
  <blockquote>
    <p>Your company's name</p>
  </blockquote>
  
  <p>Why is the text does not render correctly and how can I prevent this?</p>
  
  <p>I already tried this:</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.CompanyName, new { @class = "account-input", @placeholder = @Html.Raw(@Html.DisplayNameFor(m =&gt; m.CompanyName)), @id = "companyname" })
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.CompanyName, new { @class = "account-input", @placeholder = @Html.Encode(@Html.DisplayNameFor(m =&gt; m.CompanyName)), @id = "companyname" })
  </code></pre>