kickstart Posted August 23, 2009 Share Posted August 23, 2009 Hi Possible bug in the bbcode parsing for this site. I was trying to highlight a section of code when explaining something. Basically trying to highlight an array index in red:- $SomeArray[1] to $SomeArray[1] The above works fine. However if it is index 0 then it doesn't $SomeArray[0] to $SomeArray[color=red][0][/color] which gives:- $SomeArray[0] All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/171518-solved-possible-bbcode-bug/ Share on other sites More sharing options...
Daniel0 Posted August 23, 2009 Share Posted August 23, 2009 Yeah, that's a known "bug" in SMF. Technically speaking it isn't a bug though. It's because [0] is a bbcode representing a list item. One might of course argue that it shouldn't be interpreted as that without being inside tags. Quote Link to comment https://forums.phpfreaks.com/topic/171518-solved-possible-bbcode-bug/#findComment-904462 Share on other sites More sharing options...
kickstart Posted August 23, 2009 Author Share Posted August 23, 2009 Hi Ah, thanks. That explains it. One for me to remember in the future All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/171518-solved-possible-bbcode-bug/#findComment-904504 Share on other sites More sharing options...
Philip Posted August 23, 2009 Share Posted August 23, 2009 Yeah, good ole SMF Just a note though, a work around is using [nobbc][/nobbc] tags (which adds a lot of extra typing) So, $SomeArray[color=red][nobbc][0][/nobbc][/color] turns into $SomeArray[0] Quote Link to comment https://forums.phpfreaks.com/topic/171518-solved-possible-bbcode-bug/#findComment-904660 Share on other sites More sharing options...
kickstart Posted August 23, 2009 Author Share Posted August 23, 2009 Hi Brilliant. Not seen that code before. Thanks Keith Quote Link to comment https://forums.phpfreaks.com/topic/171518-solved-possible-bbcode-bug/#findComment-904722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.