only parse text page and remove invalid characters before getting content