After the front-end special characters are passed to the background, the display problem is returned.

The

page has an input box that can pass any content to the background. If the Chinese symbols are passed to the background, such as:-"these, then the data returned to me by the background next time is-& quot;. If it is replaced by regular check, I feel that there are too many Chinese characters that need to be checked, and if the original input is & mdash;, I feel that there are too many Chinese characters that need to be checked. String, then it will be parsed into Chinese after verification-- the symbolic, encodeURI () method is not very suitable, so ask the bosses to answer

.
Mar.16,2021

or change the backend. In fact, the backend does not need to be escaped, because there is preprocessing, it will not be injected by sql. But it's obviously not realistic, and the back end won't do it.

so to change the front end, you need to prepare two functions, an escape, a reversal, and a dictionary mapping. For example, ", you can change it to _ quot_ , or something like that. The weirder the character, the less likely it is to type it artificially, so change it boldly.

Menu