Search results corrupting URLs
Moderator: Thorsten
Search results corrupting URLs
We are having an odd problem.If I do a search and the results contain URLs, the link to the first article works correctly, however subsequent linkls to differnt articles have malformed URLs.
Hi,
which version do you use? This should be fixed in 1.3.9
bye
Thorsten
which version do you use? This should be fixed in 1.3.9
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
is it possible for you to show your FAQ with this bug?
bye
Thorsten
is it possible for you to show your FAQ with this bug?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
OK....this machine is not on the net, but as messy as it is I will post the output from phpMyFaq and then a dump of 2 rows that are having this problem:
[/code]
Code: Select all
<p><p>4 search results</p>
<ul type="square">
<li><b>Aboriginals</b>: <a href="/infosite/english/index.php?sid=aa99304d9ccb6dabb3e3620b1d278822&aktion=artikel&rubrik=001&id=17&lang=en&highlight=schedule">Aboriginal Peoples of Canada Adaptations Regu...</a><br><div style="font-size: 10px;"><b>Content: </b> The Firearms Act has regulations that apply particularly to Aboriginal peoples. ...</div><br></li>
<li><b>Application Forms</b>: <a href="/infosite/english/index.php?sid=aa99304d9ccb6dabb3e3620b1d278822&aktion=artikel&rubrik=006&id=34&lang=en&highlight=schedule">Form JUS 794E <span style="color: #FF0000; border: 1px dotted #FF0000;">Schedule</span> A
Declaration and con...</a><br><div style="font-size: 10px;"><b>Content: </b> To view form JUS 794E click on this link <a href="http://nbcpsw0998/infosite/for...</div><br></li>
<li><b>Application Forms</b>: <a href="/infosite/english/index.php?sid=aa99304d9ccb6dabb3e3620b1d278822&aktion=artikel&rubrik=006&id=33&lang=en&highlight=schedule">Form JUS 793E <span style="color: #FF0000; border: 1px dotted #FF0000;">Schedule</span> C
Application for alt...</a><br><div style="font-size: 10px;"><b>Content: </b> To view form JUS 793E click on this link <a href="http://nbcpsw0998/infosite/for...</div><br></li>
<li><b>Application Forms</b>: <a href="/infosite/english/index.php?sid=aa99304d9ccb6dabb3e3620b1d278822&aktion=artikel&rubrik=006&id=32&lang=en&highlight=schedule">Form JUS 792E <span style="color: #FF0000; border: 1px dotted #FF0000;">Schedule</span> B
Recommendation for ...</a><br><div style="font-size: 10px;"><b>Content: </b> To view form JUS 792E click on this link <a href="http://nbcpsw0998/infosite/for...</div><br></li>
</ul>
</p>
Code: Select all
# phpMyAdmin MySQL-Dump
# version 2.5.0
# http://www.phpmyadmin.net/ (download page)
#
# Host: localhost
# Generation Time: Dec 04, 2003 at 12:12 PM
# Server version: 3.23.56
# PHP Version: 4.3.0
# Database : `pub_infosite`
# --------------------------------------------------------
#
# Table structure for table `pubfaqdata`
#
# Creation: Dec 04, 2003 at 10:16 AM
# Last update: Dec 04, 2003 at 12:00 PM
# Last check: Dec 04, 2003 at 11:48 AM
#
CREATE TABLE `pubfaqdata` (
`id` int(11) NOT NULL auto_increment,
`lang` varchar(5) NOT NULL default '',
`active` char(3) NOT NULL default '',
`rubrik` text NOT NULL,
`keywords` text NOT NULL,
`thema` text NOT NULL,
`content` text NOT NULL,
`author` varchar(255) NOT NULL default '',
`email` varchar(255) NOT NULL default '',
`comment` enum('y','n') NOT NULL default 'y',
`datum` varchar(15) NOT NULL default '',
PRIMARY KEY (`id`,`lang`),
FULLTEXT KEY `keywords` (`keywords`,`thema`,`content`)
) TYPE=MyISAM AUTO_INCREMENT=54 ;
#
# Dumping data for table `pubfaqdata`
#
INSERT INTO `pubfaqdata` VALUES (34, 'en', 'yes', '006', 'schedule\r\naboriginal\r\ndeclaration\r\nindian\r\nmetis', 'Form JUS 794E Schedule A\r\nDeclaration and confirmation\r\n', 'To view form JUS 794E click on this link [url=http://nbcpsw0998/infosite/forms/794e.pdf ]http://nbcpsw0998/infosite/forms/794e.pdf [/url]', 'user1', 'user1@domain.ca', 'n', '20031204120017');
INSERT INTO `pubfaqdata` VALUES (35, 'en', 'yes', '006', 'Pain\r\nAgency\r\npublic', 'Form JUS 975E Application for a Public Agency Identification Number to the Registrar of Firearms', 'To view form JUS 975E click on this link [url=http://nbcpsw0998/infosite/forms/975.pdf]http://nbcpsw0998/infosite/forms/975.pdf[/url]', 'user1', 'user1@domain.ca', 'n', '20031204102341');
Hi Bill,
I found the problem: The links are cut in the middle of the HTML code and then there is only a mess.
I'll look for a solution to solve this problem.
bye
Thorsten
I found the problem: The links are cut in the middle of the HTML code and then there is only a mess.

I'll look for a solution to solve this problem.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi Bill,
this would solve the problem. Just remove this from functions.php in the function searchEngine():
bye
Thorsten
this would solve the problem. Just remove this from functions.php in the function searchEngine():
Code: Select all
$thema = preg_replace('/(((href|src)="[^"]*)?'.$begriff.'(?(1).*"))/umies', "highlight_no_links(\"\\1\")", $thema);
$content = preg_replace('/(((href|src)="[^"]*)?'.$begriff.'(?(1).*"))/umies', "highlight_no_links(\"\\1\")", $content);
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi Bill,
sorry, I just forgot something.
Delete this part in artikel.php:
bye
Thorsten
sorry, I just forgot something.
Delete this part in artikel.php:
Code: Select all
if (isset($_REQUEST["highlight"]) && $_REQUEST["highlight"] != "/" && $_REQUEST["highlight"] != "<" && $_REQUEST["highlight"] != ">") {
$highlight = $_REQUEST["highlight"];
$highlight = str_replace("/", "\/", $highlight);
$content = preg_replace('/(((href|src)="[^"]*)?'.$highlight.'(?(1).*"))/umies', "highlight_no_links(\"\\1\")", $content);
}
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
this issue will be handled better in phpMyFAQ 1.4.0 M2.
bye
Thorsten
this issue will be handled better in phpMyFAQ 1.4.0 M2.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi Bill,
I will backport it to 1.3.9 next week or just mail me.
bye
Thorsten
I will backport it to 1.3.9 next week or just mail me.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
I have problems when the search word is in the title (I think that is the cause?)
http://www.myie2info.com/faq/plugininde ... f=download
http://www.myie2info.com/faq/plugininde ... f=download