I know due to the documentation, that the magic word PAGENAME returns a special encoding for some characters (&, ', ") → (&) (') (").
But while developing a lua function i found out, that the Hyphen-Minus character is returned as - if and only if it is the first character of the pages title and has no other characters in front of it like BASEPAGENAME for example. To show the effect i wrote a lua function in Modul:Str function showChars in german wiktionary which adds a blank before every character of the string which is passed as a parameter into it.
This can be seen on the old version of the page '-phorese'
where i used three pagename magic words: PAGENAME, PAGENAMEE and #titleparts:{{PAGENAME}}
https://de.wiktionary.org/w/index.php?title=-phorese&oldid=9969511
On the page https://de.wiktionary.org/wiki/Benutzer:Formatierer/-minus-minus-
this only happens if SUBPAGENAME is used and only for the first of the hyphens.
I know, that this did not happen in Mediawiki version 39.4 because i have a local installation running this version. I don't know in which version this behavior starts and if it is a bug or a feature. If this is not a bug it should be documented.
Steps to replicate the issue (include links if applicable):
- visit https://de.wiktionary.org/w/index.php?title=-phorese&oldid=9969511
- or https://de.wiktionary.org/wiki/Benutzer:Formatierer/-minus-minus-
What happens?:
Hyphen-Minus is returned as -
What should have happened instead?:
Hyphen-Minus should have been returned as -
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):