Data: unescaped control character
tobozo opened this issue · 2 comments
hi,
hvsc.php is sometimes serving invalid characters with the file.name property of some songs.
Apparently it's always the last character of the same property and that character is always 0x7f so it should be easy to find the cause.
I collected some examples, not sure how many folders are affected:
SID_Happens/2020 folder:
{
"filename": "Lightforce_in_E.sid",
"substname": "",
"playerraw": "GoatTracker_V2.x",
"player": "GoatTracker_V2.x",
"tags": [
"Remix"
],
"tagtypes": [
"mixorigin"
],
"lengths": "7:45",
"type": "PSID",
"version": "2.0",
"clockspeed": "PAL 50Hz",
"sidmodel": "MOS6581",
"datasize": "4913",
"loadaddr": "4086",
"initaddr": "4086",
"playaddr": "4099",
"subtunes": "1",
"startsubtune": "1",
"name": "Lightforce in E�", <<<<<<<< \u007f
"author": "Eric Dobek",
"copyright": "2020-11-22 Eric Dobek",
"stil": "<br /><b>TITLE:</b> Lightforce\n<br /><b>ARTIST:</b> Rob Hubbard\n<br /><b>COMMENT:</b> Based on <a class=\"redirect\" href=\"#\">/MUSICIANS/H/Hubbard_Rob/Lightforce.sid</a>",
"rating": 0,
"hvsc": "0",
"symid": 0,
"videos": "0",
"profile": "_High Voltage SID Collection/MUSICIANS/D/Dobek_Eric",
"uploaded": "2020-11-27 11:03:55"
}SID_Happens/2021 folder:
{
"filename": "25_or_6_to_4.sid",
"substname": "",
"playerraw": "GoatTracker_V2.x",
"player": "GoatTracker_V2.x",
"tags": [
"Demo",
"Cover",
"Chicago"
],
"tagtypes": [
"production",
"origin",
"suborigin"
],
"lengths": "5:00",
"type": "PSID",
"version": "2.0",
"clockspeed": "PAL 50Hz",
"sidmodel": "MOS8580",
"datasize": "4630",
"loadaddr": "4096",
"initaddr": "4096",
"playaddr": "4099",
"subtunes": "1",
"startsubtune": "1",
"name": "25 or 6 to 4 (Chicago cover)�", <<<<<<<< \u007f
"author": "Ari-Pekka Paljakka (Zardax)",
"copyright": "2021 Artline Designs",
"stil": "",
"rating": 0,
"hvsc": "0",
"symid": 0,
"videos": "0",
"profile": "_High Voltage SID Collection/MUSICIANS/Z/Zardax",
"uploaded": "2021-02-16 20:37:53"
}folder SID_Happens/2022 folder:
{
"filename": "4matted.sid",
"substname": "",
"playerraw": "GoatTracker_V2.x",
"player": "GoatTracker_V2.x",
"tags": [
"Intro",
"Conversion",
"VIC-20"
],
"tagtypes": [
"production",
"origin",
"suborigin"
],
"lengths": "5:00",
"type": "PSID",
"version": "2.0",
"clockspeed": "PAL 50Hz",
"sidmodel": "MOS8580",
"datasize": "2304",
"loadaddr": "4096",
"initaddr": "4096",
"playaddr": "4099",
"subtunes": "1",
"startsubtune": "1",
"name": "4matted�", <<<<<<<< \u007f
"author": "Jani Joeli (Frostbyte)",
"copyright": "2022 Artline Designs",
"stil": "",
"rating": 0,
"hvsc": "0",
"symid": 0,
"videos": "0",
"profile": "_High Voltage SID Collection/MUSICIANS/J/Joeli_Jani",
"uploaded": "2022-02-14 07:21:20"
}I couldn't reproduce this, but the name property is not used by the JS files anyway, so I made sure it is no longer included by the hvsc.php file.
The terminating '0x7f' character is a [DEL] character as stray ascii value in a document, strange non printable characters can also be produced by people strongly relying on keyboard shortcuts in their IDE/code editor (I'm one of those): the habit of using shortcuts increases the probability of accidentally typing an alt-code, and the text editor option to turn all non-printable characters (cr/lf/tabs) invisible becomes versatile 😉
thanks for trying to reproduce it and providing a fix for the json error 👍
closing this issue as "hidden under the carpet" 🤣