Page MenuHomePhabricator

Apostrophe causes signatures to be truncated on user talk pages when using the iOS app
Open, Stalled, LowPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Create a user with an apostrophe in their name (e.g., "Foo'bar"
  • Leave a signed comment on a user talk page (NB, talks other than user talks don't seem to have this bug)
  • View the result, and try clicking on your username in the signature

What happens?:
The link is truncated, and you're sent to the user page of a user named "Foo"

What should have happened instead?:
It should link to your user page ("User:Foo'bar"), i.e., the link should not be truncated due to the apostrophe

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
iOS app version 6.9.0 (1922)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@ABorbaWMF blocked on ability to create user names with apostrophes

JMinor changed the task status from Open to Stalled.Dec 1 2022, 9:49 PM

I check with @Daimona and they checked with the user who reported this issue. It appears to still be an issue. In the interim, perhaps I can invite this user to Testflight and we can test the fix on a beta build?

Comments/responses -

Qualche mese fa era stato segnalato un problema nell'app per cui i link a utenti con un apostrofo nel nome venivano troncati. A quanto mi è stato detto su mw.org, il bug dovrebbe essere stato risolto nell'ultima versione dell'app, ma per motivi vari a quanto pare non possono fare test. Quindi chiederei a [@ Luca Dell'Orto] e altri che avessero modo di provare: potreste confermare se il bug è stato risolto o meno? Grazie, --Daimona Eaytoy (Scrivimi!) 21:36, 5 dic 2022 (CET) >

Ciao [@ Daimona Eaytoy], grazie mille della segnalazione. Ho appena controllato e nel mio caso (versione 7.00 su iOS; appena aggiornata) il problema non si è risolto. --Luca Dell'Orto (𝄢) 21:41, 5 dic 2022 (CET) >

Translated from above -

A few months ago, an issue was reported in the app where links to users with an apostrophe in their name were truncated. As far as I'm told on mw.org, the bug should be fixed in the latest version of the app, but for various reasons they apparently can't test. So I would ask [@Luca Dell'Orto] and others who have a way to try: could you confirm if the bug is fixed or not? Thanks, --Daimona Eaytoy (Write me!) 21:36, 5 Dec 2022 (CET) >

Hello [@ Daimona Eaytoy], thank you so much for reporting. I just checked and in my case (version 7.00 on iOS; just updated) the problem didn't go away. --Luca Dell'Orto (𝄢) 21:41, 5 Dec 2022 (CET) >

The fix is client-side. The bug occurs in this area, where we determine relative URLs from a blob of html.

Repro steps:
Go to article (Nice Dream) on IT Wikipedi, go to talk page where user Luca Dell'Orto has left a comment. Tapping any link to this user incorrectly navigates to Utente:Luca_Dell.

The html tag attributes passed in here are rel="mw:WikiLink" href="./Utente:Luca_Dell'Orto" title="Utente:Luca Dell'Orto" id="mwBw", but the URL string determined from the regex is ./Utente:Luca_Dell.

If you test our the non-escaped regex href[\s]*=[\s]*["']?[\s]*((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)[\s]*["']? in https://regex101.com/ against rel="mw:WikiLink" href="./Utente:Luca_Dell'Orto" title="Utente:Luca Dell'Orto" id="mwBw", you'll see that it thinks the single apostrophe ends the link evaluation. So I think we need to improve the regex to consider this case.