Modify regex to allow section links as valid titles

Bug: 53219
Change-Id: I552d0128de2c1ca683e30ae6d4b9fb137b827c7d
(cherry picked from commit 227f214610008b3f380583d222d75f9f66ea82b8)