[PEAR-BUG] Bug #19844 [Com]: Error in url parsing

[email protected] ("klapin") Wed, 12 Nov 2014 19:46:19 +0000 (GMT)
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=19844&edit=1

 ID:               19844
 Comment by:       klapin
 Reported By:      klapinklapin at gmail dot com
 Summary:          Error in url parsing
 Status:           Open
 Type:             Bug
 Package:          HTML_BBCodeParser2
 Operating System: centos
 Package Version:  0.1.0
 PHP Version:      5.4.11
 New Comment:

The parser accepts also urls without [url] tags. That is a feature, not
a bug.


Previous Comments:
------------------------------------------------------------------------

[2013-03-06 20:31:19] vhome

Description:
------------
Instead of 1 link it give me broken html with 2 links
This also allow to do XSS attacks

Test script:
---------------
Input code:

[url=http://malware.testing.google.test/testing/malware/]Your text to
link here...[/url]http://malware.testing.google.test/testing/malware/

Expected result:
----------------
<a 
href='http://malware.testing.google.test/testing/malware/'>Your 
text to link here...
</a>http://malware.testing.google.test/testing/malware/

Actual result:
--------------
<a 
href='http://malware.testing.google.test/testing/malware/'>Your 
text to link here...</a><a 
href='http://malware.testing.google.test/testing/malware/'>http:/
/malware.testing.google.test/testing/malware/</a>

------------------------------------------------------------------------


-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=19844&edit=1