summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-26 20:45:15 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-26 20:45:15 +0200
commit624b0733d0a028e374bad2199819d3a25632f30c (patch)
tree1a56bf2d26563ae301452b48a0aa24029d84e8d2 /src/websnap.cpp
parentAdding QWeakPointers for the walletbar and the previewselectorbar. (diff)
parentName cleanup in WebSnap::imagePathFromUrl with QRegExp. (diff)
downloadrekonq-624b0733d0a028e374bad2199819d3a25632f30c.tar.xz
Merge commit 'refs/merge-requests/191' of git://gitorious.org/rekonq/mainline into m2_191
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r--src/websnap.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp
index 1405fb6e..afa08c64 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -185,18 +185,7 @@ QString WebSnap::imagePathFromUrl(const KUrl &url)
{
QUrl temp = QUrl(url.url());
QString name = temp.toString(QUrl::RemoveScheme | QUrl::RemoveUserInfo | QUrl::StripTrailingSlash);
-
- // TODO learn Regular Expressions :)
- // and implement something better here..
- name.remove('/');
- name.remove('&');
- name.remove('.');
- name.remove('-');
- name.remove('_');
- name.remove('?');
- name.remove('=');
- name.remove('+');
-
+ name.remove(QRegExp(QL1S("[&+=_?./-]")));
return KStandardDirs::locateLocal("cache", QString("thumbs/") + name + ".png", true);
}