vuejs / vue-issue-helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`+` is not escaped in issue body or title

spenserblack opened this issue · comments

I recently submitted an issue with + in the title and body using https://new-issue.vuejs.org/, and the + sign was not rendered in the title or body. I had to make a manual edit to include the + in the GitHub issue. This seems to be due to + being included literally in the URL params instead of the URL encoding for +, %2B.

Edit:
looking at the source code, I see that it is explicitly converted from escape to +.

const title = encodeURIComponent(this.title).replace(/%2B/gi, '+')
const body = encodeURIComponent(this.generated.markdown).replace(/%2B/gi, '+')

Why is that?