In many cases, the Razor parser is smart enough to figure out when the @
sign is meant to be used as part of code, as opposed to being part of something like an email address. In the example below, escaping the @
sign is not necessary:
<p>Reach out to us at [email protected]</p>
However, in some cases, usage of the @
sign is more ambiguous, and it must be explicitly escaped with @@
, as in the example below:
<p>Join us @@ Stack Overflow!</p>
Alternatively, we can use a HTML encoded @
character
<p>Join us @ Stack Overflow!</p>