I've only noticed this on one page so far but on en.ws, an author page uses a typographic apostrophe rather than a straight apostrophe and the <title> tag in the HTML renders his name as "G. R. O'Reilly" rather than "G. R. O'Reilly". See https://en.wikisource.org/wiki/Author:G._R._O%27Reilly and view the source to find "<title>G. R. O&#39;Reilly - Wikisource, the free online library</title>"
Description
Event Timeline
In English Wikisource it occurs in all Portal and Author space pages containing apostrophes in the title.
- https://en.wikisource.org/wiki/Portal:Aesop%27s_Fables
- https://en.wikisource.org/wiki/Portal:Niles%27_Weekly_Register
- https://en.wikisource.org/wiki/Portal:Bah%C3%A1%27%C3%AD_Faith
- https://en.wikisource.org/wiki/Author:Arnaud-Michel_d%27Abbadie
- https://en.wikisource.org/wiki/Author:Roger_L%27Estrange
- https://en.wikisource.org/wiki/Author:Charles_Louis_L%27H%C3%A9ritier_de_Brutelle
In French Wikisource it happens in Portal space but not Author space
- https://fr.wikisource.org/wiki/Portail:Histoire_de_l%27art
- https://fr.wikisource.org/wiki/Auteur:Jean_Le_Rond_d%E2%80%99Alembert
In Italian Wikisource it happens in neither space
- https://it.wikisource.org/wiki/Autore:Charles_Louis_L%27H%C3%A9ritier_de_Brutelle
- https://it.wikisource.org/wiki/Portale:Lingue_e_dialetti_d%27Italia
In English Wikipedia it does not happen in Portal space
In Multilingual Wikisource it does not happen in Author space
I just tried creating Portal:Sandbox/"&' on English Wikisource: all three characters " & and ' are affected.
I guess that the encoding of these characters done by {{PAGENAME}} is interacting with some over-zealous escape script somewhere.
Okay so https://en.wikisource.org/wiki/MediaWiki:Pagetitle specifically uses {{PAGENAME}} in order to remove the namespace prefix in the title, which I guess will need to be removed to resolve the issue. I wonder if we can remove the namespace prefix without encoding these characters.
Okay, I found that #titleparts undoes the encoding that {{PAGENAME}} does, so I placed {{#titleparts:{{PAGENAME}}}} in MediaWiki:Pagetitle and that seems to have done the trick.