diff --git a/src/storage/fileitem.cpp b/src/storage/fileitem.cpp index 1aca5c6..3f4fc21 100644 --- a/src/storage/fileitem.cpp +++ b/src/storage/fileitem.cpp @@ -568,7 +568,14 @@ QString FileItem::findAnchorAt(QPoint pos) { int startAt = 0; int endAt = blockText.length(); for (int i = 0; i < blockText.length(); i++) { - if (blockText.at(i).isSpace()) { + QChar ch = blockText.at(i); + bool isUrlChar = ch.isLetterOrNumber() + || (ch == '-') + || (ch == '.') + || (ch == '_') + || (ch == '~') + || (ch == '%'); + if (!isUrlChar) { if (i < charPosition) { startAt = i + 1; } else {