Permalink
Show file tree
Hide file tree
8 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
When detecting html in init, ignore html characters within quotes, br…
…ackets, and parens as well as escaped characters which are valid in selectors. Fixes #11290.
- Loading branch information
Showing
2 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's gone too far the other way... http://jsfiddle.net/HCa89/1/
7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that invalid? http://jsfiddle.net/timmywil/HCa89/3/
7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edited link
7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it would be an issue with something like: http://jsfiddle.net/timmywil/HCa89/4/. Let's see if we can modify.
7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regular expressions cannot match context-free grammars. I'm pretty sure the task is impossible; we must give up either
rhtmlString
or backwards compatibility.7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relevant (but not really): http://nikic.github.com/2012/06/15/The-true-power-of-regular-expressions.html
7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gibson042: I don't think that's necessarily true. There is a middle ground. The current behavior allows unexpected things to happen. All we need to do is remove those, which will both avoid the "starts-with" technique and maintain backwards compatibility (meaning we continue to support what we meant to support, not necessarily what was accidentally allowed, such as
elem[attr="<div/>"]
). I think we can agree these don't need to be supported. It sounds like you are more in favor of the even more strict rule, starts-with, but I think this would cause even more problems. Here's another pass, it is closer to the behavior I'm looking for, but size is a concern: 041858ecc7692ae4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reply there.