Is it safe to encodeURIComponent in URL path?

后端 未结 0 1878
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-16 16:16

I want to escape a string variable into a URL. However, I want to escape the variable in the URL path, not in the query.

For example with this nodejs snippet:

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