Today I saw a little trick for HTML text escaping on CSDN, which is very simple. 1. Use dom functions. First pass it to a DOM object as innerTEXT, then take the innerHTML attribute to get the escaped text. For example: div1.innerText = "<h1>title title....</h1>"; var str = div1.innerHTML; // "<h1>title title..." 2. Assuming there is a text context, you can perform $(x).text(context).html() on a jQuery object $(x), which will return an escaped text. var str = $(x).text(context).html() |
<<: The difference between docker run and start
>>: How to use the EXPLAIN command in SQL
Table of contents 1. Draw a circle 2. Circle move...
Step 1: Get the MySQL YUM source Go to the MySQL ...
This article shares the specific code of Vue.js t...
Table of contents Preface The role of deconstruct...
A few days ago, the library said that the server ...
This article shares with you how to use JavaScrip...
In languages, macros are often used to implement ...
Table of contents 1. Function signature 2. Functi...
I recently started learning database, and I feel ...
Table of contents need: Function Points Rendering...
Table of contents Scene Introduction Plugin Imple...
Most people compile MySQL and put it in the syste...
Table of contents Why is IN slow? Which is faster...
I often see some circular wave graphics on mobile...
First, install openssh-server in docker. After th...