Page 1 of 1

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

PostPosted: Thu Sep 13, 2007 5:52 pm
Author: sanji
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 :

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('&lt;', '&gt;', '&quot;', ':', '[', ']', '(', ')', '{', '}');$between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags);  

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

PostPosted: Wed Apr 09, 2008 7:01 am
Author: Helter
your code is not displaying correctly. Here it is in a text file