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) {
try {
const urlMatch = html.match(/src="?([^"\s]+)"?\s*/);
const url = urlMatch[1];
const url = urlMatch[1].replace("&", "&"); // Reverse html encoding of url parameters
let name = "";
const altMatch = html.match(/alt="?([^"]+)"?\s*/);
if (altMatch && altMatch.length > 1) {