Link to External Pages with Anchor Elements test is too permissive
See original GitHub issueDescribe your problem and how to reproduce it:
the challenge can be passed with an url like href="https://freecatphotoapp.com."
, or href="https://freecatphotoapp.com/stuuyuuufushtfgh"
Add a Link to the page with the problem: https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements
Suggestion:
-assert(/https:\/\/(www\.)?freecatphotoapp\.com/gi.test($('a').attr('href')));
+assert(/^https:\/\/(www\.)?freecatphotoapp\.com$/i.test($('a').attr('href')));
- add anchors to make sure that the link is exactly that with no extra stuff around
- remove the
g
tag which in this case is just useless - ~[possibly] add the possibility to have an
http
link pass, seeing that the video hint show that link (it shows an examplehttps
, and then it deletes thes
)~
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Link to External Pages with Anchor Elements (anchor)
Question: Your a element should have the anchor text of “cat photos”. Thank you. I had some issues on it too.
Read more >Link to External Pages with Anchor Elements Free ... - YouTube
... LINK : https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/ link-to-external - pages-with-anchor -elementsCheck out ...
Read more >Link to External pages with Anchor Elements | freeCodeCamp
Linking to external pages is accomplished in HTML using an anchor text. In this tutorial, we use anchor text to link a few...
Read more >Link to External Pages with Anchor Elements, freeCodeCamp ...
In this challenge we learn how to link to external pages using anchor elements. Anchor elements are usually those clickable words on a...
Read more >jdk8/jdk8/langtools: 933ba3f81a87
+ * + * @param sectionName the section name anchor attribute for page + ... or interface in java.math\"><code>Link to external member gcd</code></a>"}, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d vote against this one, personally. The
http
vshttps
often trips up campers, but I think that’s an important bit that calls attention to the fact that the protocol matters.These I very much agree with and, provided no one disagrees, would gladly open this up to contributions.
An issue with the help wanted or first timers only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.
If you would like to contribute, and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/
If you have any issues with contributing, be sure to join us on the contributors channel, or on the contributors sub-forum