A
A
alpha9172017-07-28 10:43:28
Software design
alpha917, 2017-07-28 10:43:28

How to do filtering in this case?

Hello!
We are developing a site on VueJS, messages need emojis, they have to be implemented by v-html (in fact, by inserting html code into the dom already in the process of executing scripts)
When we send a message, it is stored on the server in the same form as it was sent.
So, having sent
Hello <img src="http://site.com/someurl.jpg">
this is exactly what we will receive later when receiving a list of messages.
which means it will be inserted into the dom and the picture will be displayed.
Question. Where is the right place to use message filtering and/or escaping?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question