Skip to content

Commit

Permalink
feat: add encodeURIComponent to support emojis and åäö (#37)
Browse files Browse the repository at this point in the history
naton authored Nov 24, 2020
1 parent ab7e5f8 commit 276aba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ const [, , longLink, codeRaw] = process.argv

let code
if (codeRaw) {
code = codeRaw.startsWith('/') ? codeRaw.substring(1) : codeRaw
code = encodeURIComponent(codeRaw.startsWith('/') ? codeRaw.substring(1) : codeRaw)
}

const short = `/${code || generateCode()}`

0 comments on commit 276aba8

Please sign in to comment.