In /lib/general.php there are two functions that encode certain characters into "safe" alternatives and invariably they are used when translating a CMS or product page title into a SEO friendly url.
Unfortunately for reasons best known to Interspire, they've used the encoding {47} for the '/' character which in some instances breaks spidering or searching and results in an error.
The fix for this is as follows:
Open: /lib/general.php
Find:
Code: Select all
function MakeURLSafe($val)
{
$val = str_replace("-", "%2d", $val);
$val = str_replace("+", "%2b", $val);
$val = str_replace("+", "%2b", $val);
$val = str_replace("/", "{47}", $val);
$val = urlencode($val);
$val = str_replace("+", "-", $val);
return $val;
}
/**
* Convert an already search engine friendly based string back to the normal text equivalent.
*
* @param string The search engine friendly version of the string.
* @return string The normal textual version of the string.
*/
function MakeURLNormal($val)
{
$val = str_replace("-", " ", $val);
$val = urldecode($val);
$val = str_replace("{47}", "/", $val);
$val = str_replace("%2d", "-", $val);
$val = str_replace("%2b", "+", $val);
return $val;
}
Replace with:
Code: Select all
function MakeURLSafe($val)
{
$val = str_replace("-", "%2d", $val);
$val = str_replace("+", "%2b", $val);
$val = str_replace("+", "%2b", $val);
$val = str_replace("/", "%2f", $val);
$val = urlencode($val);
$val = str_replace("+", "-", $val);
return $val;
}
/**
* Convert an already search engine friendly based string back to the normal text equivalent.
*
* @param string The search engine friendly version of the string.
* @return string The normal textual version of the string.
*/
function MakeURLNormal($val)
{
$val = str_replace("-", " ", $val);
$val = urldecode($val);
$val = str_replace("{47}", "/", $val);
$val = str_replace("%2f", "/", $val);
$val = str_replace("%2e", "/", $val);
$val = str_replace("%2d", "-", $val);
$val = str_replace("%2b", "+", $val);
return $val;
}