开发者

Strings from JSON response not escaped correctly in HTML markup

I have a JSON response with strings escaped as follows: 24" escaped as 24&#34 (no semicolon)

When I write this string to markup with JQuery .text(), 开发者_开发技巧the final result appears as 24&#34 in the generated markup (the & in 24&#34 is HTML escaped).

Is there a good way to display this text correclty in the browser (i.e. 24" instead of 24&#34)?


try .html() instead of .text() and the data you are getting is coming from database?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜