Unknown HTML entity on QueryString

Why is ReSharper telling me that it doesn't know about a querystring field?
ResharperIssue1.png

@foreach (UserEntity user in issue.Items)
 {
    <tr onclick='top.location.href="AccountDetails?id=@Request.QueryString["id"]&objectguid=@user.ObjectGuid"' onmouseover='style.cursor="pointer"'>
        <td>@user.Username</td>
        <td>@user.Firstname</td>
        <td>@user.Lastname</td>
        <td>@user.EmailAddress</td>
    </tr>
 }

2 comments

Technically, you need to HTML-encode the querystring:
AccountDetails?id=@Request.QueryString["id"]&amp;objectguid=@user.ObjectGuid

0

I didn't realize it needed to be encoded here. That did the trick.

Thanks,
Bobby Cannon

0

Please sign in to leave a comment.