Autocompleting names containing a ' will cause confusing output

Bug #325878 reported by Yann Kaiser on 2009-02-05
Affects Status Importance Assigned to Milestone
Armagetron Advanced

Bug Description

To reproduce:
1/ Start a server, and a trunk client.
2/ Set your name to "'hello", and connect
3/ Type "/msg he<tab> Greetings!" (ends up showing "/msg 'hello Greetings!")

The server will return an error:
  No matches found that contained hello Greetings!

Expected result:
The message would be sent.

Related branches

Yann Kaiser (epsy) on 2009-02-05
Changed in armagetronad:
importance: Undecided → Medium
milestone: none → 0.3.2
status: New → Confirmed
wrtlprnft (wrtlprnft) wrote :

This appears to be a serverside problem… for some reason quotes are used, but escape sequences with \ aren't. Your example could be fixed by making »he<tab>« expand to »"'hello"«, but if the player was named »'"hello« there wouldn't be any way…

The best way would probably be to either disable quotes on the server or enable escape sequences on the server and changing the clientside code to prefix a \ if the autocompleted name started with a ' or ".

wrtlprnft (wrtlprnft) wrote :

Turns out you can use escape sequences after all, just not to escape the initial quote. So if the nick starts with a quote surround it with the other kind of quote and escape all the occurence of that other kind inside the string. Done.

Changed in armagetronad:
assignee: nobody → wrtlprnft
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers