Bug 291364 - Quotes are being added to links

Martin Klapetek martin.klapetek at gmail.com
Mon Jun 17 22:12:21 UTC 2013


Hey,

On Tue, Jun 18, 2013 at 12:00 AM, Ahmed Ibrahim Khalil <
ahmedibrahimkhali at gmail.com> wrote:

> Hi All,
>
> I've taken a look at that bug. And also had taken a look at the mUrlRegExp
> inside the PostWidget.cpp file.
>
>
> I am not good at RegExps so I thought to jump and ask the guys in
> Freenode's #regexp about a good regular expression, that matches this case
> and doesn't append the trailing character to the url.
>

If you're looking for a good RegExp to match urls, we have one in
kde-telepathy, which is borrowed from Konversation, which apparently went
through years of improvements etc. The best thing is that it's a QRegExp
already. We've been using it for years and it works just fine. Feel free to
borrow it from here:

http://quickgit.kde.org/?p=ktp-common-internals.git&a=blob&h=46cf566bf3e5388bc12f84dd27c41863d025acaf&hb=347988c448dd503d7f1c813dd5b96ac293bcd20a&f=KTp%2Ftext-parser.cpp

Cheers
-- 
Martin Klapetek | KDE Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/choqok-devel/attachments/20130618/d26bd706/attachment.html>


More information about the Choqok-devel mailing list