Split the HTML parsing code from the URL preview resource code.