|
10-23-2003, 11:52 PM | #1 |
Green Mole
Join Date: Sep 2003
Posts: 6
|
Problems with html coments <!-- -->
When I index pages with html coments like
<!-- #begintemplate="algo" --> the spider replace it with < begintemplate algo > and this is a problem because I have coments with paths to conexion entries for my DataBases The regular expressions in robot functions that match with that kind of sentences is as it appears: //f..k <!SOMETHING tags !! $text = eregi_replace('(<)!([^-])','\1\2',$text); Sorry for my english, thanks for suggestions. BYE <!-- #begintemplate="algo" --> |
10-24-2003, 01:47 AM | #2 |
Purple Mole
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
|
It is a problem with with > PHP 4.3.2 . The following must work as possible solution: See this thread here:
Change ONLY this in robot_functions.php Line 160: Code:
//replace any group of blank characters by an unique space $text = ereg_replace("[[:blank:]]+"," ",strip_tags($text)); Code:
//replace any group of blank characters by $text = preg_replace('/<.*>/U', '', $text); NO html-comments are indexing ! -Roland- |
10-24-2003, 05:40 AM | #3 |
Green Mole
Join Date: Sep 2003
Posts: 6
|
What about that
The real problem I have is when I index an internet domain, the comments appear, and when I work with the intranet domain works well (no comment). We have PHP 4.3.2. I made that change in the order of eregi_replace in robot_functions.php.
BEFORE: //replace blank characters by spaces $text = eregi_replace("--|[{}();\"]+|</[a-z0-9]+>|[\r\n\t]+",' ',$text); //f..k <!SOMETHING tags !! $text = eregi_replace('(<)!([^-])','\1\2',$text); AFTER: //f..k <!SOMETHING tags !! $text = eregi_replace('(<)!([^-])','\1\2',$text); //replace blank characters by spaces $text = eregi_replace("--|[{}();\"]+|</[a-z0-9]+>|[\r\n\t]+",' ',$text); I test the change and seems to work fine. I will reindex all today and if results... I post another commentarie. Again sorry for may english... |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
<!-- phpdigInclude --> and <!-- phpdigExclude --> doesn`t work | Paka76 | How-to Forum | 0 | 12-06-2005 06:44 AM |
Indexing "<word>-<word>"? | FaberFedor | How-to Forum | 23 | 02-28-2005 04:35 AM |
Where have all the <titles> gone? | siliconkibou | Troubleshooting | 8 | 08-27-2004 08:09 AM |
Instructions for use <!-- phpdigExclude --> and <!-- phpdigInclude --> | maquido | How-to Forum | 1 | 06-02-2004 04:36 AM |
< phpdigInclude > | oliviert | Troubleshooting | 12 | 05-19-2004 03:13 AM |