mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	unescape HTML before downloading images, #4566
This commit is contained in:
		| @@ -519,7 +519,7 @@ function downloadImages(noteId, content) { | |||||||
|     let imageMatch; |     let imageMatch; | ||||||
|  |  | ||||||
|     while (imageMatch = imageRe.exec(content)) { |     while (imageMatch = imageRe.exec(content)) { | ||||||
|         const url = imageMatch[1]; |         let url = imageMatch[1]; | ||||||
|         const inlineImageMatch = /^data:image\/[a-z]+;base64,/.exec(url); |         const inlineImageMatch = /^data:image\/[a-z]+;base64,/.exec(url); | ||||||
|  |  | ||||||
|         if (inlineImageMatch) { |         if (inlineImageMatch) { | ||||||
| @@ -541,6 +541,8 @@ function downloadImages(noteId, content) { | |||||||
|                 continue; |                 continue; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  |             url = utils.unescapeHtml(url); | ||||||
|  |  | ||||||
|             if (url in imageUrlToAttachmentIdMapping) { |             if (url in imageUrlToAttachmentIdMapping) { | ||||||
|                 const attachment = becca.getAttachment(imageUrlToAttachmentIdMapping[url]); |                 const attachment = becca.getAttachment(imageUrlToAttachmentIdMapping[url]); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user