php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56252 long url's are chopped
Submitted: 2004-12-21 21:36 UTC Modified: 2005-01-24 03:54 UTC
From: alan_k@php.net Assigned: dufuz (profile)
Status: Closed Package: PECL bug system (PECL)
PHP Version: Irrelevant OS: na
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: alan_k@php.net
New email:
PHP Version: OS:

 

 [2004-12-21 21:36 UTC] alan_k@php.net
Description:
------------
example: this url gets broken onto 2 lines - making it unusable..
doing the http:// replace before the wraplines 
either that or just use <pre wrap="true" .. or whatever the html is.. might be better..

http://www.akbkhome.com/svn/pear/HTML_Template_Flexy/HTML_Template_Flexy-1.1.1.tgz


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-23 17:15 UTC] helgi at trance dot is
I have the fix for this lying around, I'll commit soon.
 [2005-01-23 17:51 UTC] helgi at trance dot is
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PEAR better.


 [2005-01-23 18:54 UTC] helgi at trance dot is
Or not, will have to test it better.
 [2005-01-23 19:06 UTC] helgi at trance dot is
No just me trippin', we tho have to fix that http:// stuff, if nothing comes after that it won't be changed into a link, shouldn't be too hard I guess, tho I'm no regex person =)
 [2005-01-24 02:46 UTC] helgi at trance dot is
No, seems I was wrong/right, pick which ever ;)

http://pear.php.net/bugs/bug.php?id=3149
http://pear.php.net/bugs/bug.php?id=3278

Those reports show how things went wrong! :(
 [2005-01-24 03:02 UTC] danielc at analysisandsolutions dot com
Helgi:

What did you modify?  I'm looking at bugs/include/functions.inc but don't see anything changed along these lines.
http://cvs.php.net/pearweb/public_html/bugs/include/functions.inc

The place to fix this is in that file in the addLinks() function.  I'm tweaking that regex right now.  Let's see what happens.

Let alone, for the umpteenth time, test things out before committing them.
 [2005-01-24 03:18 UTC] helgi at trance dot is
Daniel, first look at pear-cvs, then you see, it's not in functions.inc, it's in bug.php, I just moved addlinks and make_tickets_links outside the nested madness, I actually tested this, on the link alan gave me and some few more, I and Pierre are dicussion this on irc and he's talking about this might be a PHP bug, as you can see in bug report 3149 it wraps on the closing </a> and makes it into
</a
>

So this was just a matter of having the link at right length to be able to reproduce this, which none of my test links did so I didn't find this out until now.
 [2005-01-24 03:25 UTC] helgi at trance dot is
btw. using wordwrap($comment, 72, "\n") fixes the problem, instead of having wordwrap($comment, 72, "\n", 1)

Think it's just best to use it, we can just move back to the old way, hence the nesting or use what I commit and add this to it, either way works just fine, was just trying to avoid removing the cut mode in my first commit.
 [2005-01-24 03:49 UTC] danielc at analysisandsolutions dot com
Fixed in CVS.

I also noticed that not forcing the wrapping of long words reduced this problem.  Yes, wordwrap() seems to be acting oddly.  Thanks.
 [2005-01-24 03:54 UTC] helgi at trance dot is
You noticed ?
That's what I said in my last comment, the 1 there = turns the force mode on.

Any who, good it's fixed now.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Feb 03 02:03:45 2023 UTC