views:

155

answers:

1

I keep running into this problem recurring, where Chrome refuses to parse tags/entities on text which is handed to it by JavaScript.

I first noticed it with entities like ". It will display " as opposed to "

Now I am also running into the problem with <strong> and <em>. It displays <strong>Text</strong> as opposed to bolding the text.

I am not having this trouble with any other browser. IE/FF/Safari/Opera all parse and display correctly.

Has anyone else run into this? Is it is bug? Am I doing something wrong? How can I work around it?

Anything would be appreciated. Thank you.

A: 

The first part of this problem I resolved by using jQuery's html() as opposed to text(). That fixed the tag parsing issue.

The &quot; entity parsing I am still working on.

Spot
Do you really need to have `"` in the text you're inserting? Life would be simple if you could simply include quotes where needed. Remember, the entity is needed as an escape in HTML, but not in your JS.
Carl Smotricz
@Carl the data is user generated. They often use quotes when they are quoting something.
Spot