Skip to content

Commit

Permalink
Merge pull request #2074 from nextcloud/backport/stable22/1795
Browse files Browse the repository at this point in the history
[stable22] Avoid creating invalid URIs from user input
  • Loading branch information
azul authored Jan 11, 2022
2 parents d630cc1 + 5b9f9a6 commit 83d970a
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 12 deletions.
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: example@example.com")
url.replaceAll(' ', '%20')
command({ href: url })
this.hideLinkMenu()
},
Expand Down

0 comments on commit 83d970a

Please sign in to comment.