Changeset 5e67a93 in subsurface


Ignore:
Timestamp:
Apr 18, 2017, 6:13:52 PM (6 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
541b86e
Parents:
c257144
git-author:
Stefan Fuchs <sfuchs@…> (04/18/17 14:41:55)
git-committer:
Dirk Hohndel <dirk@…> (04/18/17 18:13:52)
Message:

More strict filter for URL handling in dive notes

Applie a more strict filter to URL handling in dive notes:
The URL needs to have:

  • Scheme like "http:" or "mailto:"
  • Host name like "www.test.de" or path like "/pathtosomewhere/"

Otherwise strings like "OTU:" or "Runtime:" are treated as URL.

Signed-off-by: Stefan Fuchs <sfuchs@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/simplewidgets.cpp

    rc257144 r5e67a93  
    705705{
    706706        QUrl url(maybeUrlStr, QUrl::StrictMode);
    707         return url.isValid() && (!url.scheme().isEmpty());
     707        return url.isValid() && (!url.scheme().isEmpty()) && ((!url.authority().isEmpty()) || (!url.path().isEmpty()));
    708708}
    709709
Note: See TracChangeset for help on using the changeset viewer.