Topic on Talk:XTools

Usernames Are Not Being Treated as Raw Strings

2
MAbdElRaoufWiki (talkcontribs)

Hello,

I found out that the the username returned in JSON response is being parsed and causing the returned value to be different. Here are a few examples:

Actual Username: 2E171

Returned Username: 2e+171

Link: https://xtools.wmcloud.org/api/user/simple_editcount/en.wikipedia/2E171


Actual Username: HickoryOughtShirt?4

Returned Username: "HickoryOughtShirt"

Link: https://xtools.wmcloud.org/api/user/simple_editcount/en.wikipedia/HickoryOughtShirt?4


Actual Username: 1789.e5

Returned Username: 178900000

Link: https://xtools.wmcloud.org/api/user/simple_editcount/en.wikipedia/1789.e5


Actual Username: 0555

Returned Username: 555

Link: https://xtools.wmcloud.org/api/user/simple_editcount/en.wikipedia/0555


Is there a parameter I should include to disable or avoid this behavior?

Thank you.

MusikAnimal (talkcontribs)

Acknowledged. Thanks for reporting this! I have a fix mostly ready to go, but a lot of other changes incidentally need to come with it, including API deprecations. I'm announcing the deprecations in XTools 3.19 which I hope to deploy tomorrow, then 3.20 with the fix for above will follow in a few weeks.

Side note: OughtShirt?4 has to be percent-encoded, because the ? is what starts the query string in URLs. I.e. use https://xtools.wmcloud.org/api/user/simple_editcount/en.wikipedia/HickoryOughtShirt%3F4 to get the correct user.

Reply to "Usernames Are Not Being Treated as Raw Strings"