Escape input but recognize valid web links

前端 未结 0 855
后悔当初
后悔当初 2021-02-06 11:57

I have a chat app and I am using this to escape / sanitize user input,

function sanitize(string) {
  const map = {
      \'&\': \'&\',
      \'<\':         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题