Re: [pear-webmaster] [PEAR-BUG] Bug #2855 [Opn]: New bug linking system converts already linked text
| From: | anatoly techtonik | Date: | Thu, 09 Dec 2004 12:13:54 +0000 |
| Subject: | Re: [pear-webmaster] [PEAR-BUG] Bug #2855 [Opn]: New bug linking system converts already linked text | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-3525@lists.php.net to get a copy of this message | ||
Hello papercrane,
Although bug had been closed, there are still two more elegant ways to
handle nasty linking issue and allow bug1234, bug#234 constructs. First
is to use the following voodoo magic lack of which was mentioned in
commit http://cvs.php.net/diff.php/pearweb/include/pear-format-html.php?r1=1.156&r2=1.157&ty=h
Patch is in attach.
Second way is to merge addlink() and make_ticket_links()
functionality. That will allow http:// links in changelogs too.
From Tuesday, November 30, 2004, 7:13:43 AM, you wrote:
pardc> Edit report at
pardc> http://pear.php.net/bugs/bug.php?id=2855&edit=1
pardc> ID: 2855
pardc> User updated by: papercrane at reversefold dot com
pardc> Reported By: papercrane at reversefold dot com
pardc> Status: Open
pardc> Type: Bug
pardc> Package: Bug System
pardc> Operating System: Irrelevant
pardc> PHP Version: Irrelevant
pardc> New Comment:
pardc> I've prepared an untested patch which should fix this. Unfortunately,
pardc> it adds 8 preg_replace calls to handle things. Could probably be pared
pardc> down to 4 if we combine the 2 bug request regexes.
pardc> http://www.reversefold.com/PEAR/pearweb.buglink.patch
pardc> Previous Comments:
pardc> ------------------------------------------------------------------------
pardc> [2004-11-30 00:02:34] helgi at trance dot is
pardc> Hmm this is way out of my reach, someone with greater knowlagde of this
pardc> thing has to do it.
pardc> ------------------------------------------------------------------------
pardc> [2004-11-29 23:47:01] helgi at trance dot is
pardc> Actually iirc you were only talking about on the wiki, but well, I
pardc> still want to support also "Bugs #1, #2 and #4 where fixed" and the
pardc> code at the moment can't do that, and the stuff that took only "#3"
pardc> would be able to handle that I guess ...
pardc> I think in the bug system and in the changelogs, it's much less about
pardc> people prefixing anything else then bug number with # really.
pardc> But well I'm going to let it be for now I guess.
pardc> ------------------------------------------------------------------------
pardc> [2004-11-29 23:37:53] papercrane at reversefold dot com
pardc> I'm the one who talked him out of letting #xxxx link to a bug. It's far
pardc> too easy to type something like "Look at line #1234".
pardc> Also, I have a patch which would fix this, but it would take 5x the
pardc> regexes as it goes a preemptive replace, then puts things back
pardc> afterwards.
pardc> ------------------------------------------------------------------------
pardc> [2004-11-29 23:33:19] helgi at trance dot is
pardc> I'm not much of a regex person but I'll look into this, also someone
pardc> removed the ability for #3454 to be turned into a link, at the moment
pardc> either bug or request has to be infront of it :/
pardc> ------------------------------------------------------------------------
pardc> [2004-11-29 12:20:13] papercrane at reversefold dot com
pardc> Description:
pardc> ------------
pardc> See bug 2841: http://pear.php.net/bugs/bug.php?id=2841
pardc> In one of my comments I put in a link to a patch. It had the phrase
pardc> bug2841 in it, which was turned into a link both within the href and in
pardc> the text of the link, causing bad HTML. The bug linking should happen
pardc> only when the text is not within another link.
pardc> Reproduce code:
pardc> ---------------
pardc> Enter a link with bug2841 in a bug comment.
pardc> Expected result:
pardc> ----------------
pardc> Link stays as-is.
pardc> Actual result:
pardc> --------------
pardc> Link has a new link embedded within the href.
pardc> ------------------------------------------------------------------------
t
--