Fix image drop url parameters
This commit is contained in:
parent
a892c09fd1
commit
c61ff28942
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user