[BUG & FIX] Tags can not be used inside a [ code ]

NOTE : this bug has been fixed here on integramod.com, but if you install a fresh board, you will have this problem !
This problem was already reported in other posts, I just copied the information here for more clarity...
See also :
http://www.integramod.com/forum/viewtopic.php?t=3198
http://www.integramod.com/forum/viewtopic.php?t=3143
http://www.integramod.com/forum/viewtopic.php?t=3049
[hr:275fai9e]
bbcode put inside a [ code ] tag are interpreted! While the text inside a [ b ] tag should not be displayed in bold, it is so...
This is the normal behavior :
But on a fresh board, the text will be displayed as bold even though it is inside a code tag...
Possible fix
In includesbbcode.php
find
after, add
This problem was already reported in other posts, I just copied the information here for more clarity...
See also :
http://www.integramod.com/forum/viewtopic.php?t=3198
http://www.integramod.com/forum/viewtopic.php?t=3143
http://www.integramod.com/forum/viewtopic.php?t=3049
[hr:275fai9e]
bbcode put inside a [ code ] tag are interpreted! While the text inside a [ b ] tag should not be displayed in bold, it is so...
This is the normal behavior :
- Code: Select all
[b]bold[/b]
But on a fresh board, the text will be displayed as bold even though it is inside a code tag...
Possible fix
In includesbbcode.php
find
- Code: Select all
$between_tags = preg_replace('#&##', '&#', $between_tags);$between_tags = preg_replace('/]+]/si', ']', $between_tags);
after, add
- Code: Select all
$code_entities_match = array('#<#', '#>#', '#"#', '#]#', '#(#', '#)#', '#{#', '#}#');$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');$between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags);