mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-26 19:14:12 +00:00 
			
		
		
		
	
						commit
						a4ed163b62
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -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; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue