|  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: Assigned: dufuz (profile)
Status: Closed Package: PECL bug system (PECL)
PHP Version: Irrelevant OS: na
Private report: No CVE-ID: None
 [2004-12-21 21:36 UTC]
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..


Add a Patch

Pull Requests

Add a Pull Request


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

In case this was a 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 ;)

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

What did you modify?  I'm looking at bugs/include/ but don't see anything changed along these lines.

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, 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

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 05:01:34 2024 UTC