amp-library
amp-library copied to clipboard
fix issue #242 Malformed URL validator for attribute 'href' in tag A
add host check to detect malformed urls supporting ipv6, ipv4 and normal url
it's error is on tests/test-data/full-html/incorrect_custom_style.html url and there is not any relation between my changes and this error.
please accept and done my pull request. i changed related test files to my changes with.html and .html.out files extension
Error Details
There was 1 failure:
- AmpTest::testFiles with data set "tests/test-data/full-html/incorrect_custom_style.html" ('tests/test-data/full-html/inc...e.html', true) Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@
Hi. anybody there!
If you look at the Travis build you can see that the change broke some tests. One test that broke is an example that uses https://ad as the url in the sample, which wasn't intended to be a test for a valid url. The test would need to be updated.
Also the crazy regex looks pretty daunting. I wouldn't want to add that in without a bunch of tests that it correctly handles all kinds of urls to be sure it isn't going to create havoc on sites that work fine now.