Info
- 3 posts
- 2 voices
- Started 2 years ago by Tomcraft1980
- Latest reply from Tomcraft1980
- This topic is resolved
prevent bbpress from encoding & nbsp;
-
- Posted 2 years ago #
Hi there,
I have the Problem, that in Code & nbsp; is encoded so the user doens't see it anymore.
Is there a way to tell bbpress to not encode & nbsp; or does this make other problems?
Kind regards
Tom
-
- Posted 2 years ago #
For some reason it doesn't get escaped by anything. How weird. Okay, the hackiest way of doing it ever:
function bb_escape_nbsp( $text ) { $text = str_replace ( ' ', '& ;nbsp;', $text ); return $text; } add_filter('post_text', 'bb_escape_nbsp'); add_filter('edit_text', 'bb_escape_nbsp');Take out the space between amp and ;
-
- Posted 2 years ago #
Works great, THX!
-
You must log in to post.