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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 16:01:30 2019 UTC