tags:

views:

124

answers:

1

I have a facebook app that is displaying random quotes - it is written in php.

One quote in the database looks like this:

"There's only one rule in photography - never develop colour film in chicken noodle soup. - Freeman Patterson"

When it is seen on facebook it looks like this:

"Thereu0027s only one rule in photography - never develop colour film in chicken noodle soup. - Freeman Patterson"

How do I fix it?

+1  A: 

Could it be a case of needing to HTML Encode that character before passing it to Facebook?

htmlentities( $quote_string , ENT_QUOTES );

Which, in the case of the above would return

$str = "There's only one rule in photography - never develop colour film in chicken noodle soup. - Freeman Patterson";
$ret = htmlentities( $str , ENT_QUOTES );
echo $ret;

Would return:

There's only one rule in photography - never develop colour film in chicken noodle soup. - Freeman Patterson

Lucanos