mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix to escape image URL before sending to the server
This commit is contained in:
@@ -2922,7 +2922,7 @@ my $iframe_body = <<EOF;
|
||||
imgPresrc.forEach(function(img) {
|
||||
(async function() {
|
||||
try {
|
||||
const response = await fetch("$webprefix/XHR.cgi?action=fetch&type=download&subtype=blob&url=" + img.dataset.presrc + "");
|
||||
const response = await fetch("$webprefix/XHR.cgi?action=fetch&type=download&subtype=blob&url=" + encodeURIComponent(img.dataset.presrc) + "");
|
||||
response.blob().then(function(blob) {
|
||||
try {
|
||||
const urlBlob = URL.createObjectURL(blob);
|
||||
|
||||
Reference in New Issue
Block a user