Hello, I am using ckeditor to implement the bulletin board with node.js.
As shown above, it was transferred to the server and saved in mysql so that if you post, you can upload the picture.
How can I solve this problem?
node.js
It's because it's filtered.
If it is not filtered, the img is inserted as it is, and if it is filtered, the html code is inserted as you can see.
The reason is to prevent XSS attacks. You could be hacked
I don't know what template engine you're using, but you have to find a phrase that doesn't filter and put it in
If you search for template engine +unescape tml you are using on Google, you will get the code
If you use ejs, ejsunescape tml
like this.
If you're using ejs while you're at it,
<%- code %>
If you do this, it becomes an escape.
© 2024 OneMinuteCode. All rights reserved.