Is there a HTML/CSS way to display HTML tags without parsing?

前端 未结 9 1115
忘了有多久
忘了有多久 2020-12-05 23:25

Is there any way that I could display HTML tags without parsing? Tags like XMP worked before perfectly but now it\'s replaced with PRE that isn\'t

9条回答
  •  庸人自扰
    2020-12-06 00:23

    Well, one way would be to use jQuery. the jQuery .text() method will encode special characters. And the original un-encoded text will remain if you view source.

    
    
    
    

提交回复
热议问题