|
-
Jun 20th, 2006, 10:14 PM
#1
[RESOLVED] Parsing BB code
I'd like to include some BB like tags for my website. It's not difficult to implement some like [b] and [i] because you can just use str_replace with a span with the correct style and just check for even numbers of starting and ending so it doesn't mess up the page.
What I'm not sure about is including a url or img tag. The img tag shouldn't be difficult but I heard there were security vulnerabilities with vBull's img tag and I want to make sure I don't make the same mistake. I also don't understand how to parse the url tag as it could be url www.vbforums.com /url or url=www.vbforums.com VBForums[/url] Again, I want to make sure I'm not opening myself up to attacks.
Is there any funcitons built into PHP geared towards this or any functionality like this already written and proven that would allow me to use it in my website?
EDIT: Unfortunately I couldn't put in the proper BB codes but you should get the idea
Last edited by Kasracer; Jun 20th, 2006 at 10:20 PM.
-
Jun 20th, 2006, 11:18 PM
#2
Re: Parsing BB code
I do,
I have a BB code parser here, it's could be better but it does the job.
http://dev.penagate.spiralmindsinc.c...er/bbcode.phps
the [img] tags might be a little weird. I'm not sure which version of the code that is 
If you want me to pick apart any of that for you I'll do so.
-
Jun 21st, 2006, 12:12 AM
#3
Re: Parsing BB code
Thanks! I'm never good with regex but I should be able to work from that
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|