godot-asset-library
godot-asset-library copied to clipboard
Sanitize inputs for Asset data/fields, like URLs
Godot version: 3.2
OS/device including version: Windows 10
Issue description: Since addition of the PSD Importer plugin (by yours truly) the Asset Library throws a malformed URL error because of an extra dot '.' that should not at the end of the URL.
That additional dot at the end should not be there and is not present in the online website. On the website the icon loads correctly:
Steps to reproduce: Open the Asset Library, see the error
Minimal reproduction project: Create a new project and open the Asset Library.
because of an extra dot '.'
This is just the end of the sentence. The error is because of something else.
oh well... Then I don't know what is wrong... The URL does work:
https://raw.githubusercontent.com/2shady4u/godot-psd-importer/master/icon/godot-psd-importer-icon-256x256.png
Looking at the API which the editor uses to get the assets, it seems like the icon URL has an additional TAB character in front:
…
"icon_url": " \thttps://raw.githubusercontent.com/2shady4u/godot-psd-importer/master/icon/godot-psd-importer-icon-256x256.png",
…
Ah... I see.. Okay I have edited the Asset and removed this unnecessary tab character.
We should probably strip non-printable characters from all inputs.