Thread:User talk:Wikinaut/Page title

Hi Wikinaut, I notice that in Title.php, there are a bunch of methods that give you the page title either with or without underscores. What if you want it to give you the exact title that was linked from a page, without turning underscores into spaces and without turning spaces into underscores? E.g., if the page says "Hello world Hello_world" then it should not render either "Hello world Hello world" or "Hello_world Hello_world". It should give you the first one with a space and the second one with an underscore.

The example at Manual:Hooks/LinkBegin uses getPrefixedDBKey, but that's unacceptable because it turns the spaces into underscores. But getFullText has the opposite problem — it turns the underscores into spaces. What's the solution? Thanks.