php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58470 Parse URLs without brackets
Submitted: 2008-12-20 07:40 UTC Modified: 2009-02-17 17:58 UTC
From: void at void dot com Assigned:
Status: Not a bug Package: bbcode (PECL)
PHP Version: 5.2.5 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 43 = ?
Subscribe to this entry?

 
 [2008-12-20 07:40 UTC] void at void dot com
Description:
------------
URLs without [url] tags should be converted into valid HTML links. The current version doesn't seem to have this functionality.

Reproduce code:
---------------
http://subdomain.domain.com

https://subdomain.domain.com

http://subdomain.domain.com/page.ext

http://domain.com

http://domain.com/page.ext

subdomain.domain.com

subdomain.domain.com/page.ext

domain.com

domain.com/page.ext

Expected result:
----------------
<a href="http://subdomain.domain.com">subdomain.domain.com</a>

<a href="https://subdomain.domain.com">subdomain.domain.com</a>

<a href="http://subdomain.domain.com/page.ext">subdomain.domain.com/page.ext</a>

<a href="http://domain.com">domain.com</a>

<a href="http://domain.com/page.ext">domain.com/page.ext</a>

<a href="http://subdomain.domain.com">subdomain.domain.com</a>

<a href="http://subdomain.domain.com/page.ext">subdomain.domain.com/page.ext</a>

<a href="http://domain.com">domain.com</a>

<a href="http://domain.com/page.ext">domain.com/page.ext</a>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-17 17:58 UTC] jani@php.net
That is something you need to do outside bbcode, it's not 
this extension's job.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC