Handle invalid titles on ProtectedPages and ProtectedTitles

bug: 46493
Change-Id: Iaa6e3378c185c53b77a4ede0ddfdfed8c6a2268a
(cherry picked from commit 19ecb69fbc2506568edbcf87cff110441bf90813)
Merge "Handle invalid titles on ProtectedPages and ProtectedTitles" into REL1_21