You are here:  » Filter on ""

Support Forum



Filter on ""

Submitted by marco@flapper on Thu, 2011-09-22 08:23 in

Hi,
I have a feed with a double " in it and wanted to filter that.

E.g.
""car""

I created a search filter on "" to replace it for a single ".
"car"

But the filter doesn't work. When I checked the filter I saw the "" was replaced by \"\".

Submitted by support on Thu, 2011-09-22 09:09

Hi Marco,

The \ (escape) characters are inserted by PHP's magic quotes feature. The script will normally automatically remove these characters, but in some PHP installations the function that indicates whether magic quotes are enabled returns the wrong sense. As they are clearly enabled in this case, to correct this edit your includes/widget.php and look for the following function beginning at line 111:

  function widget_posted($text)
  {
    if (get_magic_quotes_runtime())
    {
      return stripslashes($text);
    }
    else
    {
      return $text;
    }
  }

...and REPLACE with just:

  function widget_posted($text)
  {
    return stripslashes($text);
  }

Then reconfigure the filter and it should work as expected...

Cheers,
David.
--
PriceTapestry.com