Using htmlentities with BBCode
<p>What I am trying to achieve is a sound method for using BBCode but where all other data is parsed through htmlentities(). I think that this should be possible, I was thinking along the lines of exploding around [] symbols, but I thought there may be a better way.</p>

<p>Any ideas?</p>
