icewolfz / jiMUD

MUD client for ShadowMUD.com using electron
http://www.shadowmud.com
7 stars 0 forks source link

Input parsing removing \ when it should not #308

Open icewolfz opened 1 month ago

icewolfz commented 1 month ago

When parsing the text this_object()->send_gmcp("Client.Media.Play {\"url\": \"file:///home/torinw/coth/coth_ds3.9/lib/www5/audio/MahnaMahna.mp3\"}") the 2nd \ is being stripped when it should be not

a related bug if you disable escape system it breaks the display and corrupts all data

icewolfz commented 1 month ago

a more condensed test string ("a{\"b\": \"c\"}" it should return exactly that but in the client it is stripping all but the first \ for some reason

icewolfz commented 1 month ago

87f34084036e0065945a2b116a21c388fd96e5b2 fixes it somewhat as it makes paring " and ' respect the escape character so all \" become " to do the \ you would need to do \", the first one would be treated normal while the 2nd one would be counted to the "

icewolfz commented 1 month ago

765e5948374cc5bd027656e5f91dd3e950eacfef fixes a little more proper the \ is \ an \" is \" so escape works for \ and " character when in a double quoted string which should be logically how escaping works i think