proprietary tags in text for parsing and converting to html tags |
[eluser]treenef[/eluser]
No not at all. Unless you've tried this for yourself, which I have btw, you don't know what can of worms you are opening. Imagine you've got NESTED bbcodes. So codes within codes to parse. Quickly your regex become unmanageable. What happens if the user forgets a closing tag? Personally, what I've done is to use wordpress's shortcodes as my own parsing engine. It works quite nicely and allows nested bbcodes. https://github.com/WordPress/WordPress/b...tcodes.php You'll also want to prevent javascript attacks. If the user types in (script) alert('some_redirect'); (/script) It gets tricky real fast... but I guess you could use codeigniter's xss clean as an idea. |
Welcome Guest, Not a member yet? Register Sign In |