php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59746 cascading flags
Submitted: 2011-05-04 09:33 UTC Modified: 2017-04-01 19:33 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: alexispay at gmail dot com Assigned:
Status: Wont fix Package: bbcode (PECL)
PHP Version: 5.3.0 OS: debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alexispay at gmail dot com
New email:
PHP Version: OS:

 

 [2011-05-04 09:33 UTC] alexispay at gmail dot com
Description:
------------
Hello,

I got a minor issue with the bbcode parser:
As far as I could see, there is no inheritance for flags, so the following code fails:

Reproduce code:
---------------
<?php

$tags['noparse'] = array(	
	'type'		=> BBCODE_TYPE_NOARG,
	'open_tag'	=> '',
	'close_tag'	=> '',
	'childs'	=> '',
	);
$tags['nosmilies'] = array(	
	'type'		=> BBCODE_TYPE_NOARG,
	'flags'		=> BBCODE_FLAGS_SMILEYS_OFF,
	'open_tag'	=> '',
	'close_tag'	=> '',
	);

$bbcode = bbcode_create($tags);

bbcode_add_smiley($bbcode, ':)', '<img src="/smilies/icon_e_smile.gif" />');

echo bbcode_parse($bbcode, '[nosmilies][noparse]:)[/noparse][/nosmilies]');

?>


Expected result:
----------------
:)

Actual result:
--------------
<img src="/smilies/icon_e_smile.gif" />

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 19:33 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 19:33 UTC] tpunt@php.net
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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 19:01:37 2025 UTC