You are here:  » Back slashes in feed

Support Forum



Back slashes in feed

Submitted by ukdave on Thu, 2008-04-24 22:24 in

Please ignore my last post David as I managed to get the cache working correctly.

I do have one other problem that I can't figure out. How do I get rid of the backslashes that keep appearing in the feed?

can\'t
Let\'s
\'particle\'

Thanks.

Submitted by support on Fri, 2008-04-25 07:22

Hi Dave,

The feed seems to be escaping the apostrophe characters; so what you would need to do is run the text through str_replace to remove the escape characters... for example:

  $title = str_replace("\'","'",$record["TITLE"]);

Cheers,
David.

Submitted by ukdave on Fri, 2008-04-25 10:15

You make it seem so easy!

Thanks David it worked a treat.

Submitted by ukdave on Fri, 2008-04-25 10:59

Can I use something like this to add a full stop to the end of the [DESCRIPTION] record as half the time there isn't one?

Submitted by support on Sat, 2008-04-26 20:04

Hi Dave,

Sure; i'd do it like this if you don't always know if there will be a full stop on the end:

$description = trim($record["DESCRIPTION"],".").".";

The trim() function removes the "." from the end if one exists (so you don't get 2 full stops) and then the ."." appends a full stop to the end.

Cheers,
David.

Submitted by ukdave on Mon, 2008-04-28 11:55

Thanks again David.