5

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!

6
  • Its limitedness - doesn't accept tags, etc.- is one of the reasons why the content property sucks IMO. That said, using é should work, shouldn't it? Commented Oct 18, 2010 at 15:21
  • did you tried © it will probably work, find the equivalent one for your symbol Commented Oct 18, 2010 at 15:21
  • Thanks guys but I found the answer. See below! Commented Oct 18, 2010 at 15:22
  • @Pekka — No, if you pass a <string> to the content property then it is specified that it is text and not markup. Commented Oct 18, 2010 at 15:22
  • possible duplicate of Adding HTML entities using CSS content Commented Aug 14, 2014 at 11:55

1 Answer 1

9

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.