Closed tmtmtmtm closed 9 years ago
It would be useful to know how much effort is involved in fixing this one. If it's going to be awkward and convoluted, then I could do something in the meantime to work around anyone creating data like this openpoliticians; but if it's fairly easy, then it would be cleaner (and more correct) to fix in PopIt.
Just noticed that this is also an issue in the UI with links to the api (Get this data) and in the API with the url
and html_url
properties. So those places also need to have the record id run though encodeURIComponent
before being included in a url.
Ok this is all fixed now and deployed to production.
When a Person has a question mark in their ID, then trying to follow links to that Person in the UI fails, as it doesn't get URL encoded.
So, for example, the first Person link on http://welshassembly.popit.staging.mysociety.org/ goes to http://welshassembly.popit.staging.mysociety.org/persons/http://www.senedd.assemblywales.org/mgUserInfo.aspx?UID=154, and fails, rather than http://welshassembly.popit.staging.mysociety.org/persons/http://www.senedd.assemblywales.org/mgUserInfo.aspx%3FUID=154 (which would succeed)