[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view



Hi Holger,

On Mon, Sep 15, 2014 at 02:32:54PM +0200, Holger Levsen wrote:
> On Samstag, 13. September 2014, Salvatore Bonaccorso wrote:
> > I had a look at this patch. It can only address isolated URLs in the
> > notes this way. We usually use this in other ways, one example is that
> > was Florian mentioned in the first message:
> >  - https://security-tracker.debian.org/tracker/CVE-2014-3122
> 
> right, thanks for this example. I'll wrap regexes around my head til it 
> matches - or so :-)

Hmm, would something wrapping around of the following work?
Considering there might be more than one matching group in each line,
so the example holds only for a simplest case again :(

----cut---------cut---------cut---------cut---------cut---------cut-----
import re
string = "Fixed by https://git.kernel.org/linus/57e68e9cd65b4b8eb4045a1e0d0746458502554c (v3.15-rc1)"
print re.search("(?P<url>https?://[^\s]+)", string).group("url")
----cut---------cut---------cut---------cut---------cut---------cut-----

> > Thanks for also looking into this one!
> 
> my pleasure, thank you all very much for many years of working on all these 
> security issues! I can now slightly better appreciate what huge task you're 
> working on!

Thanks Holger!

Regards,
Salvatore


Reply to: