diff --git a/mozilla/toolkit/components/microformats/src/Microformats.js b/mozilla/toolkit/components/microformats/src/Microformats.js index 7d881dfba65..afd041cb165 100644 --- a/mozilla/toolkit/components/microformats/src/Microformats.js +++ b/mozilla/toolkit/components/microformats/src/Microformats.js @@ -722,9 +722,20 @@ var Microformats = { xpathResult.singleNodeValue.microformat = mfname; parentnode = xpathResult.singleNodeValue; } - /* If the propnode is not a child of the microformat, remove it*/ + /* If the propnode is not a child of the microformat, and */ + /* the property belongs to the parent microformat as well, */ + /* remove it. */ if (parentnode != mfnode) { - propnodes.splice(i,1); + var mfNameString = Microformats.getNamesFromNode(parentnode); + var mfNames = mfNameString.split(" "); + var j; + for (j=0; j < mfNames.length; j++) { + /* If this property is in the parent microformat, remove the node */ + if (Microformats[mfNames[j]].properties[propname]) { + propnodes.splice(i,1);; + break; + } + } } } if (propnodes.length > 0) { diff --git a/mozilla/toolkit/components/microformats/tests/test_Microformats.html b/mozilla/toolkit/components/microformats/tests/test_Microformats.html index 7bf6f829b21..3d405ba9f73 100644 --- a/mozilla/toolkit/components/microformats/tests/test_Microformats.html +++ b/mozilla/toolkit/components/microformats/tests/test_Microformats.html @@ -85,6 +85,15 @@ 1998-01-22 +