Skip to content

Commit

Permalink
Check MFM url
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Feb 11, 2023
1 parent bb2f4a0 commit 245adf5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/client/components/url.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default Vue.extend({
},
created() {
const url = new URL(this.url);
if (!['http:', 'https:'].includes(url.protocol)) throw new Error('invalid url');
this.schema = url.protocol;
this.hostname = decodePunycode(url.hostname);
this.port = url.port;
Expand Down

0 comments on commit 245adf5

Please sign in to comment.