Problem Getting BBCode To Display Coloured Headlines Correct

Updated as some info was incorrect

When I save formatted text from Scrivener using Edit>Copy Special>Copy as BBCode for use in a Forum powered by SMF 1.1.11 I’m getting a problem in the way my headlines and sub-heads are being saved.

Here’s an example of the BBCode Scrivener creates from a headline. Please note: I’ve deliberately added spaces in the code to get it show in this post

[color=#800000 ]Sample Headline

Although the headline idsplays properly formatted it always has immediately after it.

This appears to be caused by incorrect BBCode order. Going back to my example if it is written as follows: [color=#800000 ]Sample Headline then it displays correctly.

Having said that I notice that in this forum powered by phpBB that it displays correctly regardless of the closing [b] and tags order.

So maybe it’s a problem specific to the forum I’m using, possibly an old version of SMF?

Is there any way to fix this?

I end up dropping it into TextWrangler and running Replace All to correct it.