PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 31, 2022

[FIXED] How do you get multiple args in a PEAR BBCODE Parser?

 August 31, 2022     bbcode, html, image, pear, php     No comments   

Issue

Currently I am parsing my text using the PHP5 PEAR BBCode parser. Now I am looking into my img tag and realise I don't know how to specify 3 args. This is the format of the input:

[img src="" title="" alt=""]

And what I want to get out:

<img src="" title="" alt="">

I am currently using this code but I cannot access multiple arguments-

    'img'=>      array('type'=>BBCODE_TYPE_NOARG,
                'open_tag'=>'<img src="', 'close_tag'=>'" />',
                'childs'=>''),

Solution

BBcode does not have the concept of multiple attributes - you cannot do what you want.

Only single, unnamed attributes are supported:

[url=http://example.org]name[/url]


Answered By - cweiske
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing