properly extract the page title string