-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch Double Forward Slashes in the URL Path #386
Comments
That URL is perfectly valid and therefore should not be flagged by html-proof as an error. Relevant authority: RFC 3986 Discussion: http://stackoverflow.com/a/10161264/300224 My recommendation is to close this issue. |
I'm going to have to abide by the RFC on this one, sorry. However, it's also possible to write your own tests, so perhaps that will work for you? https://github.com/gjtorikian/html-proofer#custom-tests |
I find it difficult to read through that RFC but it everyone is in agreement that it's allow, okay. I'll look into a custom test. |
@FelicianoTech Don't read the RFC, here is a quick experiment you can try (I should probably put this on SO somewhere): cat > tmp.php <<'EOF'
<?php
echo $_SERVER['REQUEST_URI'];
EOF
php -S localhost:4000 tmp.php Now open your browser to http://localhost:4000/hello//world It loads. |
URLs such as the following,
http://example.com/blog//my-first-post/
, passes HTML Proofer. This causes an issue for me because double forward slashes aren't part of proper URLs. Some servers will process it, some will throw a 404.HTML Proofer should catch a double slash in the path as an error. Or at least, put that functionality behind a flag.
Note, this is not to be confused with protocol relative URLs,
//example.com/blog/my-first-post/
. That's a perfectly fine URL. I'm not complaining about that nor should support for that change.The text was updated successfully, but these errors were encountered: