Reimplemented using html parser (DOMDocument)