I have created my own function for converting BBCode into XHTML, as can be seen below. I have successfully managed to convert all BBCode tags and also add paragraph <p> tags where necessary.
The next step is to convert quotes, brackets <> and other characters to their corresponding HTML Entity. However, I am unsure as to how to do this. I know about the htmlspecialchars() and htmlspecialentities() functions but I don't think they would work well with existing HTML.
For instance, it would end up converting quotes inside or <a> tags would convert angle br...e { return false; } } [/CODE]
The next step is to convert quotes, brackets <> and other characters to their corresponding HTML Entity. However, I am unsure as to how to do this. I know about the htmlspecialchars() and htmlspecialentities() functions but I don't think they would work well with existing HTML.
For instance, it would end up converting quotes inside or <a> tags would convert angle br...e { return false; } } [/CODE]