bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

=) as the exclusive title text creates unclickable topic

(3 posts)
  • Started 1 year ago by bobbyh
  • Latest reply from _ck_
  • This topic is not resolved

No tags yet.

  1. bobbyh
    Member

    I had a user write a post with this title:

    =)

    This creates a post like this:

    * http://www.kosmosity.com/forums/topic/?replies=1#post-2

    I'm using the "slug" option on this test forum which uses the default theme and bbPress 0.8.2.1. It looks like the =) is being sanitized to "" (an empty string), which confuses bbPress and leads to that topic resolving to an error page. On the test forum to which I just linked, I have no plugins except WordPress Integration.

    Has anybody else run into this bug? Is there an existing workaround? If other people can replicate this bug, I'll create a ticket in Trac. Also, if there's no existing workaround, I'll try to create a plugin workaround.

    Thanks,
    Bob

    Posted 1 year ago #
  2. Yeah, that's probably sanitized into nothing.

    Add a ticket describing it in Trac.

    We'll need to create a case for "untitled" topics like this.

    Posted 1 year ago #
  3. Or simply don't let the post be made with titles that get sanitized into nothingness, or better yet, titles that are shorter than X characters - something like:

    function title_regulation($text) {
    if (strlen(trim($text))<8)
    	bb_die(__('Your title is too short, please say something meaningful!'));
    
    if (strlen($text)>80)
    	bb_die(__('Your title is too long!'));
    
    return $text;
    }
    add_filter('pre_topic_title', 'title_regulation',100);
    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.