EmidioStani / rdfquery

Automatically exported from code.google.com/p/rdfquery
0 stars 0 forks source link

RDFa Fails to Parse On Some Browsers #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Despite the vague summary, the fix for this issue is easy.

On line 114, linked below, adding undefined entries in the atts array
causes different execution paths. Only adding attributes that have values
will improve the robustness of the algorithm.

http://code.google.com/p/rdfquery/source/browse/trunk/jquery.rdfa.js#114

In version 1.0, this line of code is never executed by IE8, but with issue
18 patched it does. This is where I noticed IE8 failing to parse RDFa, but
resolved it by filtering out undefined attribute values.

See Also:
http://code.google.com/p/rdfquery/issues/detail?id=18

Original issue reported on code.google.com by james-no...@leighnet.ca on 2 Nov 2009 at 3:22

GoogleCodeExporter commented 9 years ago
To filter out unwanted attributes check if they are specified before adding 
them to
the atts array using an if(a.specified) block.

http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-637646024

Original comment by james-no...@leighnet.ca on 2 Nov 2009 at 3:41

GoogleCodeExporter commented 9 years ago

Original comment by jeni.ten...@gmail.com on 2 Nov 2009 at 4:38

GoogleCodeExporter commented 9 years ago
James, Please just make sure (a) that all the tests continue to pass (in 
Firefox and Safari) after you make changes 
and (b) that you add a test that illustrates the problem.

Original comment by jeni.ten...@gmail.com on 2 Nov 2009 at 4:40