Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.6.0
-
Component/s: Zend_Search_Lucene
-
Labels:None
-
Fix Version Priority:Must Have
Description
It would be nice if the Zend_Search_Lucene_Document_Html would use the rel-attribute of links. The getLinks method no fetches all links of a document.
Patch:
Index: Search/Lucene/Document/Html.php
===================================================================
— Search/Lucene/Document/Html.php (revision 9039)
+++ Search/Lucene/Document/Html.php (working copy)
@@ -105,7 +105,7 @@
$linkNodes = $this->_doc->getElementsByTagName('a');
foreach ($linkNodes as $linkNode) {
- if (($href = $linkNode->getAttribute('href')) != '') {
+ if (($href = $linkNode->getAttribute('href')) != '' && $linkNode->getAttribute('rel') != 'nofollow' ) {
$this->_links[] = $href;
}
}
Please categorize/fix as needed.