Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #9221. Wraps openings of html comments and CDATA blocks found a…
…t the beginning of inserted script elements into a javascript block comment so that the new implementation of globalEval will not throw an exception in IE (execScript being less lenient than eval). Unit tests added.
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 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
391398c
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.
I'm confused by this commit. Why would someone comment out the last line of the comment but not the first one? What's the use case here? And is this really important enough to land post-RC?
391398c
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.
Apparently, every browser we support do allow an opening html comment at the start of inline script tags, exemplified by the fact it worked in 1.5.2 when we were still using script tag injection. Sadly, this feature is popular enough to have a library like Drupal use it.
If you want to revert it, feel free to do it, but it's clearly a regression, it breaks a major PHP library, it's actually a bug since what we were doing with scripts in 1.6.0 wasn't symetric with what the browsers do. Thought it was perfectly into the boundaries between a RC and a release.
391398c
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.
Oh yea! That's another reason script injection was awesome, easy xbrowser support for both comment styles in the code. This continues to bite Prototype, it seems some security software would also wrap some ajax responses.