Info
- 5 posts
- 2 voices
- Started 2 years ago by Terranb
- Latest reply from Terranb
- This topic is not resolved
Slashes being added when using certain symbols
-
- Posted 2 years ago #
Hi,
I'm noticing that back-slashes are being added when I use apostrophes or double-quotes in my forum. I've seen this before and I think I fixed it by adding stripslashes() or something around the variable, but I don't know where I'd add it.
Is this a problem with the theme I'm using rather than bbpress? Any thoughts on how to fix it? Where are the post and title boxes created?
Thanks.
-
- Posted 2 years ago #
I've seen that on integrated installations, or when using a language file. Is that your situation?
This has been reported but I don't recall much about it lately, not a lot any way:
http://bbpress.org/forums/topic/slashes-being-added-in-front-of-apostrophes#post-3953 -
- Posted 2 years ago #
-
- Posted 2 years ago #
Yep, I have it integrated with wordpress. I'll give those fixes a shot.
Is there anyway I could add them without hacking core? Maybe as a plugin? This post (http://bbpress.org/forums/topic/slashes-being-added-in-front-of-apostrophes#post-12563) suggests adding this:
if (function_exists('wp_head')) { // or another check to see if WordPress has been included add_filter('get_topic_title', 'stripslashes'); add_filter('get_post_text', 'stripslashes'); }to the "WordPress Integration" plugin. Since that plugin is in wordpress, not bbpress it didn't seem like it would work, but I tried anyway and nothing. One person said it worked. Where might they have been adding it?
Then there is hacking core files, which I'd rather not do since it makes updating more difficult.
-
- Posted 2 years ago #
I just added the code I pasted above to my theme's header.php file and that seems to have done it. Any reason this is a bad idea?
-
You must log in to post.