Manual:CleanupTitles.php

cleanupTitles.php is a maintenance script located in the maintenance directory that can be used to clean up broken, unparseable titles. The edits will be attributed to the user called Conversion script.

Usage
php cleanupTitles.php

For additional options see php cleanupTitles.php --help

Result
Fixed pages are moved to Broken/ (where is the cleaned up version of the broken title)