英文:
Issue while store email store with % sign
问题
你好,我从前端将数据存储到MySQL数据库中,然后在前端检索这些数据,但在我更新电子邮件并保存后,它保存为abs%gmail.com而不是abs@gmail.com。当我第一次保存它们时没有出现任何问题,我已经从stackoverflow、git和其他来源寻找解决方案,但这些解决方案都没有奏效。
对于任何解决方案,我都会非常感激。
英文:
Hi I have store data from frontend to MySQL DB and retrieving them to frontend but after I update the email and save, it saves like abs%gmail.com instead abs@gmail.com. When I saving them for the first time no issues occur, I have looked solutions from stack overflow, git and ext. but any of those did not work.
Any solution will be generally appreciating.
答案1
得分: 0
it's encoded
simply decode it in your flow
decodeURIComponent('abs%40gmail.com')
// result: "abs@gmail.com"
encodeURIComponent('abs@gmail.com')
// result: "abs%40gmail.com"
英文:
it's encoded
simply decode it in your flow
decodeURIComponent('abs%40gmail.com')
// result: "abs@gmail.com"
encodeURIComponent('abs@gmail.com')
// result: "abs%40gmail.com"
专注分享java语言的经验与见解,让所有开发者获益!
评论