Use WebPage instead of string for content; check document charset when parsing