Rik de Vos
Rik de Vos

Reputation: 3517

Javascript - replace special character code with character

using javascript, is there a way to replace the special character code's with the special character?

For example:
& becomes &
© becomes ©

Thanks!!

Upvotes: 2

Views: 2888

Answers (2)

Gustavo Giráldez
Gustavo Giráldez

Reputation: 2690

Take a look here: http://www.strictly-software.com/htmlencode

The Encoder.js file from that page seems to do what you're asking for.

Upvotes: 2

Shaokan
Shaokan

Reputation: 7684

See Cerebrus' answer in this post

EDIT

Actually KooiInc's answer is exactly what are you are looking for

Upvotes: 0

Related Questions