Made parsing of "page name=" parameter more robust

Change-Id: I5923de51e5d18475febb96a0b3e52e26af3b4845