fix URL encoding for HTML validation