Removed older fix for #508. Added new fix which quotes URL using safelist before lxml.etree.fromstring