Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Avoid creating invalid URIs from user input
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and azul committed Jan 11, 2022
commit 5b9f9a606cb8a6cadb644063394236f341453642
6 changes: 3 additions & 3 deletions js/editor-rich.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-rich.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/public.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/components/MenuBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ export default {
if (url && !noPrefixes.find(regex => url.match(regex))) {
url = 'https://' + url
}

// Avoid issues when parsing urls later on in markdown that might be entered in an invalid format (e.g. "mailto: [email protected]")
url.replaceAll(' ', '%20')

command({ href: url })
this.hideLinkMenu()
},
Expand Down