JQuery call function for search gives an “invalid” error in Firefox

I am extracting data from an XML file and then using the jQuery.find () function to access that data. However, in Firefox (version 37.0.2), I get the following errors in the JavaScript console:

Error: Unable to run script because scripts are blocked internally.
Error: not well-formed
Source Code:
<datarecord><div><a id='sizzle1430853521804'></a><select id='sizzle1430853521804- ]' msallowcapture=''><option selected=''></option></select></

Everything still works fine, but does anyone know how I can get rid of this error, or is it a bug in Firefox?

Here is my code:

$.ajax({
  url:"file.xml", 
  type:"GET", 
  dataType:"xml", 
  success:function(xml){
    $(xml).find("field_id").each(function(){
      // my code...
    }
  }
});

The XML file has the following format, and I used the XML validator to make sure that it is in order:

<?xml version="1.0" encoding="utf-8"?>
<datarecord>
<field_id><TheIdValue>8</TheIdValue><TheDisplayValue>Joe Bloggs</TheDisplayValue></field_id>
etc...
</datarecord>

I could not find a solution. Any suggestions?

+4
source share
1 answer

, , " " firefox. , jQuery 1.11.2 1.11.3 : https://github.com/jquery/jquery/issues/1969 - ​​.

, jquery - . github commit

jquery.1.11.3.js cca 1197 ( QSA/matchesSelector):

 -              "<select id='" + expando + "-\f]' msallowcapture=''>" +
 +              "<select id='" + expando + "-\r\\' msallowcapture=''>" +

, .

+6

All Articles