Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use html entities in CSS content property?

Tags:

html

css

entities

Good day,

I'm stuck with a problem this morning. I found out that content property which is nice but I can't use HTML entities in it.

More specifically, I would like to use the é

This is what I tried: content: 'test with eacute \233'; but the result is test with eacute ÿ

I've also tried \0233, \0233c, \233c

I don't want to change my page's encoding.

Thank you in advance guys!

like image 241
Cybrix Avatar asked Oct 18 '10 15:10

Cybrix


1 Answers

Hmm I found that website : http://www.evotech.net/articles/testjsentities.html

And it looks like the é (&eacute, &#233) is converted into \00E9

And now, content: 'test with eacute \00E9'; works!

like image 69
Cybrix Avatar answered Nov 15 '22 01:11

Cybrix