Author: aik.bold
Description:
Test case:
- Create page named "Why & got relaced" (without quotes). I type "amp;" twice, because & visually is transformed to "&" in HTML.
- In database page_title (dbkey) will be "Why_&_got_relaced"
- Go to that page & try to rename (move) it to title like this "test new title"
- This fails with message, that no form data submitted :( -------------
I've analyzed it a bit. This is what I've found:
- On the form we have hidden field "wpOldTitle" with value: "Why & got relaced", it's ok and input for new page name named "wpNewTitle".
- When submitting that values to php wpOldTitle becomes "Why & got relaced"
- method MovePageForm::doSubmit create Title objects from old title and new title
Problem begins, when Title::newFromText calls $filteredText = Sanitizer::decodeCharReferences( $text ); and replaces last "&" in old title name to "&" and old title becomes "Why_&_got_relaced". When method moveTo is called it fails, because can't load page by this name.
Version: 1.11.x
Severity: minor
OS: Windows XP
Platform: PC