Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Issue: Razor bug parsing HTML [710]

$
0
0
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

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>