MyBB Hacks

Full Version: Strip Tags from the Forum Jump listbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's a little interesting - MyBB allows you to put HTML in forum names.  It's all good and nice - until you notice the forum jump listbox is erm, a little stuffy...

This is an extremely simple mod, which will fix up the forum jump listbox.

In /inc/functions.php,
Find:

PHP Code:
$forum['name'] = htmlspecialchars_uni($forum['name']);

Replace with:

PHP Code:
$forum['name'] = htmlspecialchars_uni(strip_tags($forum['name']));


In /forumdisplay.php,
Find:

PHP Code:
eval("\$forums = \"".$templates->get("forumdisplay")."\";");

Add before:

PHP Code:
$foruminfo['name'] = strip_tags($foruminfo['name']);

This help me a lot... thank's !
Nice, hoepfully it shall be fixed in 1.4
The code works perfect for jumpbox, but the titelline in browser shows up the html code of image. Is there a way to change this ?

Tia
TriTop
^ I updated the first post (do additional code edits for forumdisplay.php)
Great! Thanks a lot for your proficient support!

Best regards
TriTop
Reference URL's