0

I am building an ASP.NET MVC website where I keep all of my localized string in a .resx resource file. However, if I try to embed any formatting or Unicode characters, I have a problem.

Example resource file [EN_US.resx]:

Key                       Value
=================================================================================
INTRO_COLLEGE             This is a <strong>really</strong> nice college&hellip;

Example view:

<p>@EN_US.INTRO_COLLEGE</p>

My problem is, any HTML formatting or special characters are literally printed as they are written in the resource file, like this:

This is a <strong>really</strong> nice college&hellip;

How can I include HTML formatting and Unicode characters in a .resx file such that they are not automatically escaped when it is printed out?

Oliver Spryn
  • 16,871
  • 33
  • 101
  • 195

0 Answers0