Fix background URI encoding

This commit is contained in:
Cohee
2023-09-04 02:51:39 +03:00
parent 67c8476cdf
commit f69aa07ec1
2 changed files with 3 additions and 1 deletions

View File

@ -897,7 +897,7 @@ async function generatePicture(_, trigger, message, callback) {
const callbackOriginal = callback;
callback = async function (prompt, base64Image) {
const imagePath = base64Image;
const imgUrl = `url('${encodeURIComponent(base64Image)}')`;
const imgUrl = `url("${encodeURI(base64Image)}")`;
if (typeof window['forceSetBackground'] === 'function') {
window['forceSetBackground'](imgUrl);