Author: jlerner
Description:
Trivial patch to Title.php
Sometimes users inadvertently put some whitespace at the beginning of an article that is intended to be a redirect. This results in the article not being classified as a redirect in the database (page.page_is_redirect).
Reproduce by creating a redirect article with some whitespace (newline or otherwise) at the beginning. Then notice that the new article appears in Special:Uncategorizedpages (where redirects normally don't appear). Or just look at the database to see that page.page_is_redirect = 0.
Solution: trim() $text at the beginning of Title::newFromRedirect().
Trivial patch attached.
Version: 1.13.x
Severity: minor
Attached: