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
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:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC