Freecodecamp: Escape quotes not working

Created on 23 Feb 2017  ยท  12Comments  ยท  Source: freeCodeCamp/freeCodeCamp

Challenge Quoting Strings with Single Quotes has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


var myStr ='<a href="http://www.example.com"  target= "_blank">Link</a>';



help wanted

Most helpful comment

@pamela113 @Marmiz: The test is quite strict. It won't accept a space between target= and "_blank" or two spaces between attributes, like there are between href="http://www.example.com" and target (which it shouldn't so as to conform to accepted standards).

All 12 comments

I was not able to reproduce this issue, my challenge pass.
Can you be more explicit on the steps to reproduce?

In the meantime I believe a refresh will let you continue.
Happy coding ๐Ÿ‘

@pamela113 @Marmiz: The test is quite strict. It won't accept a space between target= and "_blank" or two spaces between attributes, like there are between href="http://www.example.com" and target (which it shouldn't so as to conform to accepted standards).

@cdrainxv good catch! didn't even noticed it in the original code ๐Ÿ‘

@cdrainxv yup, thanks for debugging this. And while you are right about having no space between values and one space between attributes, I think this is still valid code.

We should probably relax the tests, given the fact that we are focusing not to involve standard practice in challenges, we have videos for those.

/cc @freeCodeCamp/moderators I am up for tagging this help wanted.

@raisedadead Adding a couple of \s* (0 or more whitespace characters) to the regex could probably solve this issue. I agree, this is ready to be fixed :blush:

@Marmiz @cdrainxv Thanks for the excellent triaging!

The exercise says to remove all .
Then you should have two single quotes and four double quotes.
The last part , 3 of 3 says you should remove all that are used to escape quotes.
I have a pass on part one and part two the third one is not passing.
Thanks for your prompt response!
Pamela

Sent from my iPhone

On Feb 22, 2017, at 10:49 PM, Claudio Restifo notifications@github.com wrote:

@cdrainxv good catch! didn't even noticed it in the original code ๐Ÿ‘

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@jdeprey
Please do not post your solution on here. You could help people at FreeCodeCamp Chat Room or Forum. GitHub Issues are for reporting bugs on the website only.

Happy Coding!

Hi, can I do this?

@IanTeo sure, please go ahead.

Here are the Guidelines for Contributing.

If extra whitespace is allowed where and how much should be acceptable? As in, should spaces be allowed before and after the assignment operator as well as between href and target?

If extra whitespace is allowed where and how much should be acceptable?

Any no. It does not matter, the browser will strip away anything that's not needed.

Hi,
Thanks Joseph!! I logged out and logged back in and it worked.
Pam

On Thu, Feb 23, 2017 at 7:48 PM, Lance notifications@github.com wrote:

@jdeprey https://github.com/jdeprey
Please do not post your solution on here. You could help people at
FreeCodeCamp Chat Room or Forum. GitHub Issues are for reporting bugs on
the website only.

Happy Coding!

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/freeCodeCamp/freeCodeCamp/issues/13531#issuecomment-282179470,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVlJhPT0bKMPOpm4m1HAH5z90idrO65vks5rfjb4gaJpZM4MJV28
.

Was this page helpful?
0 / 5 - 0 ratings