|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59513 Max number of replaces per tag
Submitted: 2010-11-17 16:22 UTC Modified: 2017-04-01 19:32 UTC
From: felixjet at gmail dot com Assigned:
Status: Wont fix Package: bbcode (PECL)
PHP Version: Irrelevant OS: Gentoo
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: felixjet at gmail dot com
New email:
PHP Version: OS:


 [2010-11-17 16:22 UTC] felixjet at gmail dot com
Would be nice to have something like:

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

So the first 5 [img] tags are replaced, while the others 
remain as plain text.

This could be done via own script (and probably should) but 
would be nice to have such function.

Reproduce code:
[img] x 8

Expected result:
<img> x 5

[img] x 3

Actual result:
[img] x 8


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-25 11:10 UTC] xdecock at gmail dot com
Can you please try the current svn trunk?

tried to implement it, 

might have some shortcommings (see test n?29) with nesting, in fact limitation goes inside out the bbcode parsing tree, i'll check how to do this in natural order.
 [2017-04-01 19:32 UTC]
-Status: Open +Status: Wont fix
 [2017-04-01 19:32 UTC]
Due to this extension not seeing any activity since 2010, this issue will not be fixed. We are therefore closing this now.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Oct 16 18:03:35 2021 UTC