2012-01-16, 01:43 PM
Pages: 1 2
2012-01-16, 03:22 PM
(2012-01-05, 02:19 PM)itheme Wrote: [ -> ]Yo,
So I know have all my HTML stripped and things but now I need to force close all tags for instance if the user doesn't close it won't make the whole page below bold is there anyway to do this?
Got it now
$txt = str_replace("[b]", "<b>", $txt."</b>");
$txt = str_replace("", "</b>", $txt);
should work right?
Also, you should place the code bit in [ php] tags to stop mybb parsing it
EG:
$txt = str_replace("[b]", "<b>", $txt."</b>");
$txt = str_replace("[/b]", "</b>", $txt);
Pages: 1 2