diff --git a/libkcal/incidenceformatter.cpp b/libkcal/incidenceformatter.cpp index 785a681b..887d000a 100644 --- a/libkcal/incidenceformatter.cpp +++ b/libkcal/incidenceformatter.cpp @@ -575,9 +575,22 @@ static TQString displayViewFormatEvent( Calendar *calendar, Event *event, } if ( !event->description().isEmpty() ) { + TQString description = event->description(); + + // Regular expression to match URLs + TQRegExp urlRegex("https?://[^\\s]+"); + + int pos = 0; + while ((pos = urlRegex.search(description, pos)) != -1) { + TQString url = urlRegex.cap(0); + TQString link = "" + url + ""; + description.replace(pos, url.length(), link); + pos += link.length(); + } + tmpStr += ""; tmpStr += "" + i18n( "Description:" ) + ""; - tmpStr += "" + event->description() + ""; + tmpStr += "" + description + ""; tmpStr += ""; }