[help] how is the jquery insertion code escaped?

jquery needs to insert a piece of code
but what the web ends up directly is the source code
. After viewing, it is escaped and puzzled. The solution
is as follows:

this.before("<b>Before</b>");

Feb.18,2022

for security reasons against injection, most of jQuery's API has been escaped for you.
so you need to use a specific API for non-escaped Dom creation.

for example: $(x) .html (' Before ')

or

const b = $('<b>Before</b>');
this.before(b);

this is not jquery

Menu