Closed Lawrr closed 4 months ago
Fixes https://github.com/pythongosssss/ComfyUI-Custom-Scripts/issues/197.
Problem is that ( and ) are not encoded when using encodeURIComponent. Have replaced it to use the encoding implementation from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#encoding_for_rfc3986 instead which includes encoding the !, ', (, ), * characters.
(
)
encodeURIComponent
!
'
*
Have tested this with the lora loader in chrome/firefox/edge with an image called !'().jpeg (no * because it cannot be used in windows filenames) and confirmed that it works.
!'().jpeg
Fixes https://github.com/pythongosssss/ComfyUI-Custom-Scripts/issues/197.
Problem is that
(
and)
are not encoded when usingencodeURIComponent
. Have replaced it to use the encoding implementation from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#encoding_for_rfc3986 instead which includes encoding the!
,'
,(
,)
,*
characters.Have tested this with the lora loader in chrome/firefox/edge with an image called
!'().jpeg
(no*
because it cannot be used in windows filenames) and confirmed that it works.