Autocompleting names containing a ' will cause confusing output

Bug #325878 reported by Yann Kaiser
2
Affects Status Importance Assigned to Milestone
Armagetron Advanced
Fix Committed
Medium
wrtlprnft

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!")

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

Expected result:
The message would be sent.

Yann Kaiser (epsy)
Changed in armagetronad:
importance: Undecided → Medium
milestone: none → 0.3.2
status: New → Confirmed
Revision history for this message
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 ".

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.