Razor in MVC has a bug when parsing HTML comments with an apostrophe in them. The engine throws an "Expected }" exception.
Below is an example on how to reproduce this issue in the default MVC 4 application with VS 2012. Just add the following a comment with an apostrophe to the @section featured {} in the default.cshtml. Remove the apostrophe from the comment and it works OK.
@section featured {
<!-- hello world it's not cool -->
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1>@ViewBag.Title.</h1>
<h2>@ViewBag.Message</h2>
</hgroup>
<p>...</p>
</div>
</section>
}
http://stackoverflow.com/a/13864352/446681
Comments: Yeurch, Thanks for replying on this. I will reactivate 933.
Below is an example on how to reproduce this issue in the default MVC 4 application with VS 2012. Just add the following a comment with an apostrophe to the @section featured {} in the default.cshtml. Remove the apostrophe from the comment and it works OK.
@section featured {
<!-- hello world it's not cool -->
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1>@ViewBag.Title.</h1>
<h2>@ViewBag.Message</h2>
</hgroup>
<p>...</p>
</div>
</section>
}
http://stackoverflow.com/a/13864352/446681
Comments: Yeurch, Thanks for replying on this. I will reactivate 933.