Jump to content

Error when sending trade (to me)


JPMorgan
 Share

Recommended Posts

It seems like your nation is messing up your leader name and your nation name or something.

 

Since when i copy and paste "JP Morgan & Co" i'm able to trade with you.

 

 

 

 

Edit: Yup, the game automatically puts your leader name into the trade menu instead of your nation name.

Edited by Peacity Peace
Icwalk.gif
Link to comment
Share on other sites

The issue is because of the ampersand in your name. New trade offers, when you click the link on a nation page, send you to a url ending in /nation=name. This works fine when you just have an alphanumeric name. However, the ampersand is a reserved character in URIs, and is not interpreted as plaintext (it's used to separate parameters in a url, e.g. here). The way to get around this is to percent-encode the url (e.g. here), which Sheepy has not done. I tried creating a trade with your nation percent-encoded (i.e. ending with /nation=JP%20Morgan%20%26%20Co (spaces are another character that sometimes needs percent-encoding) instead of /nation=JP Morgan & Co), but that didn't work either. After a bit of fiddling I've concluded that the game decodes the URL before processing it, meaning that it converts "%20%26%20" back to " & " before dealing with it like a normal URL (i.e. ignoring the fact that we didn't want the & to be a special &). But if you percent-encode the percent-encoded URL (i.e. ending with /nation=JP%2520Morgan%2520%2526%2520Co (the percent sign is another reserved character that needs to be encoded)) then it will work exactly as desired.

 

tl;dr use this link (or enter things manually) until Sheepy fixes things.

 

Edit: IPB auto-detecting URLs is dicks.

Edited by Roll Sheepy
  • Upvote 2
RollSheepy.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and the Guidelines of the game and community.