diff --git a/src/lib/bookmarksimport/chromeimporter.cpp b/src/lib/bookmarksimport/chromeimporter.cpp index 68f523343..0d66d9f03 100644 --- a/src/lib/bookmarksimport/chromeimporter.cpp +++ b/src/lib/bookmarksimport/chromeimporter.cpp @@ -71,8 +71,8 @@ QList ChromeImporter::exportBookmarks() parsedString = "(" + parsedString + ")"; if (scriptEngine->canEvaluate(parsedString)) { QScriptValue object = scriptEngine->evaluate(parsedString); - QString name = object.property("name").toString(); - QUrl url = QUrl::fromEncoded(object.property("url").toString().toUtf8()); + QString name = object.property("name").toString().trimmed(); + QUrl url = QUrl::fromEncoded(object.property("url").toString().trimmed().toUtf8()); if (name.isEmpty() || url.isEmpty()) { continue; diff --git a/src/lib/bookmarksimport/htmlimporter.cpp b/src/lib/bookmarksimport/htmlimporter.cpp index 6985611a9..690821a3c 100644 --- a/src/lib/bookmarksimport/htmlimporter.cpp +++ b/src/lib/bookmarksimport/htmlimporter.cpp @@ -66,7 +66,6 @@ QList HtmlImporter::exportBookmarks() QString bookmarks = QString::fromUtf8(m_file.readAll()); m_file.close(); - // Converting tags to lower case -,- // For some reason Qt::CaseInsensitive is not everytime insensitive :-D @@ -106,7 +105,7 @@ QList HtmlImporter::exportBookmarks() rx.indexIn(string); // QString arguments = rx.cap(1); - QString folderName = rx.cap(2); + QString folderName = rx.cap(2).trimmed(); folders.append(folderName); @@ -127,13 +126,13 @@ QList HtmlImporter::exportBookmarks() rx.indexIn(string); QString arguments = rx.cap(1); - QString linkName = rx.cap(2); + QString linkName = rx.cap(2).trimmed(); QRegExp rx2("href=\"(.*)\""); rx2.setMinimal(true); rx2.indexIn(arguments); - QUrl url = QUrl::fromEncoded(rx2.cap(1).toUtf8()); + QUrl url = QUrl::fromEncoded(rx2.cap(1).trimmed().toUtf8()); start += posOfLink + rx.cap(0).size(); diff --git a/src/lib/bookmarksimport/operaimporter.cpp b/src/lib/bookmarksimport/operaimporter.cpp index 8156a9e93..5b03d01fa 100644 --- a/src/lib/bookmarksimport/operaimporter.cpp +++ b/src/lib/bookmarksimport/operaimporter.cpp @@ -61,11 +61,11 @@ QList OperaImporter::exportBookmarks() QRegExp rx2("NAME=(.*)\\n"); rx2.setMinimal(true); rx2.indexIn(string); - QString name = rx2.cap(1); + QString name = rx2.cap(1).trimmed(); rx2.setPattern("URL=(.*)\\n"); rx2.indexIn(string); - QUrl url = QUrl::fromEncoded(rx2.cap(1).toUtf8()); + QUrl url = QUrl::fromEncoded(rx2.cap(1).trimmed().toUtf8()); if (name.isEmpty() || url.isEmpty()) { continue;