How to reproduce :
- Go to any page that uses Language Converters' -{T|}- syntax to change title, Such as this
What happens?:
Raw HTML tag can be seen in the Title
What should have happened instead?:
Title should by styled by the html in the title
Whats the reason behind it:
Currently, you can put whatever you want in Language Converters' -{T|}- syntax including HTML syntax like magic word displaytitle without using displaytitle function in CoreParserFunctions.php.
When we need to process the title, the logic in Parser.php will call get_targetLanguageConverter()->getConvRuleTitle() and then using the string from convertTitle and set it as the new title using setTitleText. You can see the logic here.
However, due to the changes made in T291985, the string from convertTitle will pass through htmlspecialchars before setting as the new title, which causes display issue like this when we do not want them to be converted by htmlspecialchars.
Potential Solution:
One solution can be to convert title from get_targetLanguageConverter()->getConvRuleTitle() using displaytitle function in CoreParserFunctions.php, with adding benefits such as HTML sanitization.