How to decode HTML entities using jQuery?

后端 未结 19 2177
忘了有多久
忘了有多久 2020-11-21 23:21

How do I use jQuery to decode HTML entities in a string?

19条回答
  •  有刺的猬
    2020-11-21 23:56

    I think that is the exact opposite of the solution chosen.

    var decoded = $("
    ").text(encodedStr).html();

提交回复
热议问题