Skip to content
Snippets Groups Projects
Commit 1836dd73 authored by syuilo's avatar syuilo
Browse files

Merge branch 'master' of https://github.com/syuilo/misskey

parents b844a8e9 a4ed163b
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ export default Vue.extend({
} else if (url.hostname == 'youtu.be') {
this.youtubeId = url.pathname;
} else {
fetch('/url?url=' + this.url).then(res => {
fetch('/url?url=' + encodeURIComponent(this.url)).then(res => {
res.json().then(info => {
this.title = info.title;
this.description = info.description;
......
......@@ -14,8 +14,8 @@ module.exports = async (ctx: Koa.Context) => {
function wrap(url: string): string {
return url != null
? url.startsWith('https://')
? url.startsWith('https://') || url.startsWith('data:')
? url
: `https://images.weserv.nl/?url=${url.replace(/^http:\/\//, '')}`
: `https://images.weserv.nl/?url=${encodeURIComponent(url.replace(/^http:\/\//, ''))}`
: null;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment