PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_BBCodeParser » Bug #1299

Case sensitive in tag ?

Details

Submitted2004-04-27 21:25 UTC
Fromdryss at jeuxonline dot info
Assignedquipo
StatusClosed
PackageHTML_BBCodeParser
PHP Version4.3.4
OSLinux
Roadmaps(Not assigned)

Comments

[2004-04-27 21:25 UTC] dryss at jeuxonline dot info

Description:
------------
(in order sorry for my bad english, i am french).

After testing your script, i have a big problem : i cant use the tag with capital, only small letter :

[url=http://www.google.com]Link[/url] is working

[URL=http://www.google.com]Link[/url] dont work

[url=http://www.google.com]Link[/URL] dont work

The parser only parse tag with small letter. Is there an option to activate the parsing of capital tag ? It is very important for me, i have to activate this for the writters of my network who doesn't know HTML.

[2004-10-18 13:40 UTC] zilla at gmx dot de

Had the same Problem.
I fixed it by changing Line 316 in BBCodeParser.php from
$newTag = $this->_buildTag(substr($str, $strPos, $closePos - $strPos + 1));

to

$newTag = $this->_buildTag(strtolower(substr($str, $strPos, $closePos - $strPos + 1)));

Hope it helps

Nicole