I'm trying to get checkmarks in my metadata description. Since my site is multilanguage, I add descriptions as follows
<%@ Page MetaDescription="<%$Resources:metadescription%>
When I add these codes checkmark codes (http://www.fileformat.info/info/unicode/char/2713/index.htm)
✓
or
✓
or as someone already suggested:
✔
In my Visual Studio 2012 resource file (default.aspx.resx), they are rendered as the exact code and not as a checkmark as I would expect. How can I render the checkmark to the HTML and not the code?
I added this line to my masterpage:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
When I enter this code directly in the HTML:
✔
so in default.aspx, the checkmark is rendered correctly!
when I replace
<%@ Page MetaDescription="<%$Resources:metadescription%>"
with
<%@ Page MetaDescription="<%=$Resources:metadescription%>"
I just get this in my HTML:
<meta name="description" content="<%=$Resources:metadescription%>" />
There seems to be something going wrong with HTML codes in the resource files, but how to fix it?
So you just see
<meta name="description" content="… ✔ …" />
in the resulting markup and you would like to see
<meta name="description" content="… ✔ …" />
instead.
First, I want to point out, that any user agent should decode the ✔
entity to ✔
when reading the content
atribute. See attributes in HTML spec. Therefore what you want is really a cosmetic change with virtually no technical impact.
If you want to get the latter markup (with ✔
), just include the ✔ in your resource file. You could copy & paste it from
javascript:'✔'
into your browser’s location bar.Alternatively you could input it directly using and input method. E.g. on Windows you could type Alt+2,7,1,4 (described on Fileformat.info too). For more practical info on input methods of various operating systems see fsymbols.com.