Save special char via component to wall

Claus Lampert Posted in Component Development 7 years ago

I use an own component that posts the content of an email to the wall. So far, so good. But this component (a derivate of the component "fake posting") can not save the # (hashtag).
I think that the # is filtered in the component OssnWall. The post is send via "return $wallpost;" to OssnWall and at this time $wallpost includes the "#"
Any idea, where the # gets filtered in the component OssnWall?

Replies
German Claus Lampert Replied 7 years ago

It´s my own (stupid) fault!
I secure the wallpost with:

   $post = preg_replace("/[^a-zA-Z .,:%-<br>0-9]/", "", $message);

It should be

   $post = preg_replace("/[^a-zA-Z .,:%-<br>0-9#]/", "", $message);

As the script for reading the mail is not mine, I cannot publish the component. Sorry...

German Michael Zülsdorff Replied 7 years ago

No idea.
I just made a posting with a hashtag # on http://demo.opensource-socialnetwork.org/home
and it appears correctly.
Make your component available on Github and we can have a look.