Skip to content
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

Fix #13223. Re-allow leading space in HTML. #1264

Closed
wants to merge 1 commit into from

Conversation

dmethvin
Copy link
Member

@dmethvin dmethvin commented May 9, 2013

Any thoughts about whether we need more tests for this?

@ruado1987
Copy link
Contributor

How about html containing tab?

elem = jQuery("\t\t<em>world</em>")[0];
equal( elem.nodeName.toLowerCase(), "em", "leading tabs" );

@dmethvin
Copy link
Member Author

dmethvin commented May 9, 2013

The change added a test for leading "space" as in \s so it seems pretty certain that a simple space or tab are okay. Newlines seemed worth testing because newlines sometimes don't match when you think they will, for example with ..

@ruado1987
Copy link
Contributor

According to MDN, \s is supposed to match a single white space character, including space, tab, form feed, and line feed. Since you have already had test cases for space (\s), and line feed (\n), why not introducing one for tab (\t). 😃

@dmethvin dmethvin closed this in 9fdbc8b May 9, 2013
mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@dmethvin dmethvin deleted the spacey branch November 5, 2015 19:21
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants