When a search is done on my site for an attached file, it highlights the word but changes the link and puts quotes around the filepath.
without the highlight my link would be
http://server_name/docs/attachments/#id/testing.doc
with the highlighted word in the link, it changes to this
http://server_name/"attachments/#id/testing.doc"
how do i fix this?
Search changes link
Moderator: Thorsten
I have temporary edited out the highlight section in artikel.php.
The search still works fine and the link is working now when searched for but of course, the highlighting is gone. The highlighting is a really nice touch and I would like to get it working soon.
I really enjoy phpmyfaq. Thanks
Code: Select all
#if (isset($_GET["highlight"]) && $_GET["highlight"] != "/" && $_GET["highlight"] != "<" && $_GET["highlight"] != ">") {
# $highlight = strip_tags($_GET["highlight"]);
# $highlight = str_replace("'", "´", $highlight);
# $highlight = preg_quote($highlight, '/');
# $content = preg_replace('/(((href|src)="[^"]*)?'.$highlight.'(?(1).*"))/mies', "highlight_no_links('\\1')", $content);
#}
I really enjoy phpmyfaq. Thanks
Last edited by dcgibs on Tue Jun 27, 2006 7:17 pm, edited 1 time in total.
Re: Search changes link
Hi,
As you can see, there is no break of the href attribute.
Could you kindly post:
I've just tested your post as the faq content into PMF 1.6.2 and then I've searched for the word "attach", find below the result:dcgibs wrote:When a search is done on my site for an attached file, it highlights the word but changes the link and puts quotes around the filepath.
without the highlight my link would be
http://server_name/docs/attachments/#id/testing.doc
with the highlighted word in the link, it changes to this
http://server_name/"attachments/#id/testing.doc"
Code: Select all
...
<a href="http://server_name/docs/attachments/#id/testing.doc" title="Test the Issue">http://<span style="font-style: italic;">server_name</span>/docs/<span class="highlight">attach</span>ments/#id/testing.doc</a>
...
Could you kindly post:
- your PMF version;
- a copy (please use
Code: Select all
tag) of your faq content: you could obfuscate the original test 'cause I'm only in need of your faq HTML structure;[*]the word(s) used for performing the search[/list]? TIA, Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
$PMF_CONF["version"] = "1.5.0 RC6"
when searching for testing
navigating directly to testing yields this
I see the break, but I can't figure out where this is happening.
when searching for testing
Code: Select all
<h2>testing</h2>
<!-- Article -->
<p><p>attached files: <a href=\"attachments/429/testing.doc" target="_blank"><span class="highlight">testing</span>.doc</a></p></p>
<!-- /Article -->
<p>Last update: 2006-06-27 12:59<br />Author: Administrator</p>
Code: Select all
<h2>testing</h2>
<!-- Article -->
<p><p>attached files: <a href="attachments/429/testing.doc" target="_blank">testing.doc</a></p></p>
<!-- /Article -->
<p>Last update: 2006-06-27 12:59<br />Author: Administrator</p>
Hi,
this was fixed during one of the 1.5.x releases.... you should upgrade to 1.5.9 or 1.6.2 as soon as possible due to security issues, too!
bye
Thorsten
this was fixed during one of the 1.5.x releases.... you should upgrade to 1.5.9 or 1.6.2 as soon as possible due to security issues, too!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
upgrade complete
i upgraded to 1.6.3 and the search works great. thanks.