NSXMLDocument fails with "<script>" string inside <script> tag
| Originator: | stefan.gugarel | ||
| Number: | rdar://20682136 | Date Originated: | 24-Apr-2015 |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | 10.10 |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
I added 2 html files in the sample
no-script-inscript.html
script-in-script-problem.html
The problem results with the following snippet:
<script type="text/javascript">
$b(".aboveNavSearchBox").on("change keyup paste", function(){ var input = $b(this);
if(input.val().toLowerCase().indexOf('<script>') >= 0) { input.val(''); } });
</script>
When string 'script' is inside <script> tag
no-script-inscript.html -> XPATH query WORKS
script-in-script-problem.html -> XPATH query does NOT WORK
In no-script-inscript.html I simply replaced '<script>' with '<test>' and it works
Steps to Reproduce:
1) Please run the attached sample
2) testScriptInScript -> no xpath query result
3) script-in-script-problem.html -> xpath query result
Expected Results:
Xpath query should work
Actual Results:
Xpath query does not work
Version:
6.3.1
Notes:
Configuration:
Attachments:
'ScriptInScriptProblem.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!