Skip to content

Commit 0b78c1e

Browse files
authored
fix: allow sharing URLs with multiple parameters
Make sure pageUrls with multiple params can be open Example: https://domain.tld/path/?a=123&b=test
1 parent 9fd5acc commit 0b78c1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/useSocialShare.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function useSocialShare(options: Options = defaultOptions) {
4646

4747
// Replace placeholders with actual values
4848
fullUrl = fullUrl
49-
.replace(/\[u\]/i, pageUrl.value)
49+
.replace(/\[u\]/i, encodeURIComponent(pageUrl.value))
5050
.replace(/\[t\]/i, title || '')
5151
.replace(/\[uid\]/i, user || '')
5252
.replace(/\[h\]/i, hashtags || '')

0 commit comments

Comments
 (0)