PDA

View Full Version : Preventing certain HTML usage...


Chris M
01-08-2003, 07:28 PM
Ok...

I want to enable HTML for a new custom-addon for my forum, but I only want certain HTML tags to be able to be used...

Some people do not get the fact that vBcode is fine, so...

The tags I want enabled:

<b>
<i>
<u>
<marquee>

:)

Doable?

Satan

Xenon
01-09-2003, 11:45 AM
hmm, i'd replace em with vb code tags:
if you have those tags for marque and so on...

open functions.php

find (in fuction bbcodeparse2)
if(!$dohtml) { // kill any rogue html code
// $bbcode=str_replace("&","&amp;",$bbcode);
$bbcode=str_replace("&lt;","&amp;lt;",$bbcode);
$bbcode=str_replace("&gt;","&amp;gt;",$bbcode);
$bbcode=str_replace("<","&lt;",$bbcode);
$bbcode=str_replace(">","&gt;",$bbcode);
}

and change it to:
if(!$dohtml) { // kill any rogue html code
// $bbcode=str_replace("&","&amp;",$bbcode);
$bbcode=str_replace("&lt;","&amp;lt;",$bbcode);
$bbcode=str_replace("&gt;","&amp;gt;",$bbcode);
$bbcode=str_replace("<","[",$bbcode);
$bbcode=str_replace(">","]",$bbcode);
}

i think it should work :)