artikel.php highlight problem

Please report bugs here!

Moderator: Thorsten

Post Reply
looktech
Posts: 4
Joined: Wed Apr 20, 2005 7:46 pm

artikel.php highlight problem

Post by looktech »

When using the search engine, it highlights words in the code my modifying it. The problem is that the code contains links to pictures that contain the same keyword we searched for.

With highlighting OFF (first image string):

<p><img height="421" alt="Netopia_1.gif" hspace="0" src="/secured/yoda/images/Netopia_1.gif" width="648" align="baseline" border="0" /></p>

Same string, highlighting on:

<p><img height="421" alt="<span class="highlight">Netopia</span>_1.gif" hspace="0" src="/secured/yoda/images/Netopia_1.gif" width="648" align="baseline" border="0" /></p>

I turned the highlight function off in artikel.php by commenting the part out and it works now.

I must have disabled something else.

Will there be a fix for this. It should not look at the attachements names !
Thorsten
Posts: 15729
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this shouldn't happened. :-(

Which version do you use?

I fix every bug! :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
looktech
Posts: 4
Joined: Wed Apr 20, 2005 7:46 pm

Post by looktech »

I used version 1.4.7

Here is the artikel.php file code i have been forced to remove.


# Remove highlight function to allow the search engine to work properly
# It was removing access to screenshots because the filename contained # the word we were searching
#
# $highlight = $_REQUEST["highlight"];
# $highlight = str_replace("/", "\/", $highlight);
# $content = preg_replace('/(((href|src)="[^"]*)?'.$highlight.'(?(1).*"))/mies', "highlight_no_links(\"\\1\")", $content);

If you can fix that man, i'd sooo love you :P
Post Reply