티스토리 뷰

공부

[JS] decode HTML entity

seunggabi 승가비 2020. 4. 14. 00:25
var title = $('<textarea />').html("Chris&apos; corner").text();
console.log(title);

https://stackoverflow.com/questions/5796718/html-entity-decode

 

HTML Entity Decode

How do I encode and decode HTML entities using JavaScript or JQuery? var varTitle = "Chris' corner"; I want it to be: var varTitle = "Chris' corner";

stackoverflow.com

 

'공부' 카테고리의 다른 글

[Python] string get index  (0) 2020.04.14
[MySQL] function `BEGIN SET i = 1;`  (0) 2020.04.14
[JS] decode HTML entity  (0) 2020.04.14
[Git] cancel add == reset  (0) 2020.04.14
[Python] ModuleNotFoundError: No module named  (0) 2020.04.12
[Linux] vi show & hide line number  (0) 2020.04.12
댓글
댓글쓰기 폼