Welcome! Log In Create A New Profile

Advanced

Using quotes around phrase yields no results (Sphider +1.6)

Posted by RMD 
RMD
Using quotes around phrase yields no results (Sphider +1.6)
November 21, 2008 12:56AM
Just installed sphider plus 1.6 clean. Was using Sphider 1.3.4 and was able to use quotes around search phrase. But now, if I type "word phrase" with quotes, the results field shows \"pink roses\" (the quotes are automatically escaped, same thing with single quote) and the message (not in yellow): Following words were ignored (too short or common): \

What could be causing this?
Tec
Re: Using quotes around phrase yields no results (Sphider +1.6)
November 21, 2008 05:47PM
For Sphider-plus double and single slashes are (normal) characters that are stored during indexed / re-index procedure as part of the full text. So you are also enabled to search for words and phrases that contain slashes (e.g. L'Oreal).

If you don't need this feature and want to kill the slashes (in your query), open the file:
.../include/commonfuncs.php
and search for:
// prevent XSS-attack and Shell-execute

Above that row additionally include:
$input = stripslashes($input);


If you only want to kill double slashes you instead should search for:
function cleaninput($input) {

Beyond that row additionally include:
$input = str_replace('"', '', $input);


Tec



Edited 1 time(s). Last edit at 11/21/2008 05:58PM by Tec.
RMD
Re: Using quotes around phrase yields no results (Sphider +1.6)
December 01, 2008 07:10PM
Thanks, Tec! Do you mean exactly right after (as in below example)?

function cleaninput($input) {
$input = str_replace('"', '', $input);
if (get_magic_quotes_gpc()) {
$input = stripslashes($input); // delete quotes
Tec
Re: Using quotes around phrase yields no results (Sphider +1.6)
December 01, 2008 09:49PM
Yes, that is what I suggested.

Tec
Sorry, only registered users may post in this forum.

Click here to login