Page MenuHomePhabricator

Electron not rendering titles with questions marks on Italian wikipedia
Closed, ResolvedPublic


It seems titles with question marks (maybe other characters) are not being rendered correctly

Steps to reproduce:

  1. Go to
  2. Select "Scarica come PDF" and colona singola

Expected: PDF for "Aha oe feii?" should be rendered
Observed: PDF for "Aha oe feii" is rendered, which is a page that doesn't exist


Event Timeline

GWicke edited projects, added Services (next); removed Services.

I looked into this a little bit. I verified that making the request directly to the REST API does not change the outcome. The response contains the title including the trailing question mark as the file name.

This establishes that

  • RESTBase receives the correct title, including the trailing question mark, and
  • the issue is either in how RESTBase makes the request to electron, or in how electron processes the request.

Looking at the RESTBase PDF render module, it seems the requested title is percent-encoded only once in a query string context. The decoded URL would then contain two raw question marks, one from the title, and the other from ?printable=yes.

The reason why the example on enwiki works, is that is a redirect page pointing to As a result, electron still manages to retrieve the content page, despite addressing it without the trailing question mark.

Mentioned in SAL (#wikimedia-operations) [2017-06-29T21:00:52Z] <mobrovac@tin> Started deploy [restbase/deploy@bcb83f4]: Fix special char handling in PDF back-end requests - T169223

Mentioned in SAL (#wikimedia-operations) [2017-06-29T21:04:07Z] <mobrovac@tin> Finished deploy [restbase/deploy@bcb83f4]: Fix special char handling in PDF back-end requests - T169223 (duration: 03m 14s)

mobrovac assigned this task to GWicke.
mobrovac edited projects, added Services (done); removed Services (next).
mobrovac added a subscriber: mobrovac.

Fix deployed, checked in production, works.