PIXEL icon indicating copy to clipboard operation
PIXEL copied to clipboard

The filenames in the webserver need apostrophes to be escaped

Open NeoTechni opened this issue 3 years ago • 3 comments

The webserver makes buttons with ONCLICK="functionname('filename')", but when filename contains apostrophes or double quotes, it breaks the javascript. These need to be escaped, or replaced in the same way you replace spaces with %20

NeoTechni avatar May 25 '21 23:05 NeoTechni

Can you tell me what you were doing? None of the images I see have quotes special characters in them?

DocCaliban avatar Jul 07 '21 23:07 DocCaliban

I think was just going through the list of images in the web server then and inspecting the elements when it failed and noticed apostrophes in the filenames, which early-terminated the string parameters

But I made a recursive scan function, and it found 1019 PNG files in the Pixelcade directory structure with apostrophes in them

I included the list in case it's handy. new 1.txt

NeoTechni avatar Jul 08 '21 03:07 NeoTechni

#32 Made a PR for this, when @alinke get back from vacation he can review it and potentially get it merged.

DocCaliban avatar Jul 08 '21 17:07 DocCaliban