Fix image drop url parameters

This commit is contained in:
Mitchell McCaffrey 2021-01-19 18:40:22 +11:00
parent a892c09fd1
commit c61ff28942

View File

@ -25,7 +25,7 @@ function ImageDrop({ onDrop, dropText, children }) {
if (html) { if (html) {
try { try {
const urlMatch = html.match(/src="?([^"\s]+)"?\s*/); const urlMatch = html.match(/src="?([^"\s]+)"?\s*/);
const url = urlMatch[1]; const url = urlMatch[1].replace("&", "&"); // Reverse html encoding of url parameters
let name = ""; let name = "";
const altMatch = html.match(/alt="?([^"]+)"?\s*/); const altMatch = html.match(/alt="?([^"]+)"?\s*/);
if (altMatch && altMatch.length > 1) { if (altMatch && altMatch.length > 1) {