Open MaxEtMoritz opened 3 years ago
I will look into this some more when I fix but this looked more like its just that Discord / PokeNav renders backslash escaping rather than return it "raw", since lookup works correctly its really just output rendering
OK so this is intentional then, though the output is not quite Right. But i found a related problem now since i wanted to really create that Test poi with Backslash at the end... and no matter how many Backslashes i put in (tried from one up to four), i was not able to create it. some Backslash keeps escaping the final hyphen and the Bot refuses to create the poi. (I don't really know if there is any portal in the world with a Backslash at the End of the portal name though...) Don't know if i should open a new Issue for this or not...
Describe the bug If a Poi name has Backslashes in it, there are two different methods to submit the Poi name:
$create poi pokestop "test\stop" someLatitude someLongitude
$create poi pokestop "test\\stop" someLatitude someLongitude
.Both Variants create ta Poi with the name being displayed as
test\stop
, but they aren't recognised as being the same poi, so you will have two poi with the name test\stop. That may be OK if You only use one variant. But the worse part of it is: Users who want to search for test\stop will have to know exactly which variant you have used:$si test\stop
will bring up only the first variant and$si test\\stop
will only bring up the second one. Why would someone want to escape backslashes? Imagine the scenario that a portal name ends with a backslash: the poi creation command would fail because the final hyphen of the portal name would be escaped by the backslash of the portal name and the Bot would throw an error. To play it safe, i decided to escape all backslashes in portal names, but not every PoGo Player knows about the special status of the Backslash in the Computer world and they will wonder why they can't find the poi with the backslash.To Reproduce Steps to reproduce the behavior:
$create poi pokestop "test\stop" someLatitude someLongitude
and$create poi pokestop "test\\stop" theSameLatitude theSameLongitude
see that two different Poi were created, the title of both Poi being displayed as
test\stop
.$si test\stop
and$si test\\stop
see that each command will bring up a different Poi.
Expected behavior the second Poi should throw an Error that it already exists. both searches should bring up two poi as result.
Screenshots Note: Discord hides the escaping backslash i used on the second Creation Command. Again the second Backslash is hidden by Discord... This is the scenario i thougt of... again the Backslash at the End of the Portal name is hidden by Discord.
Additional context I am asking because i created an IITC Plugin to send Portal Info to Discord and wanted to play it safe and escape all backslashes in portal names.