Version: (using KDE KDE 3.3.92) Installed from: SuSE RPMs OS: Linux If you click on a link to a file then the file is opened directly, without asking whether to save it (thus ignoring the settings Konqueror is using for that mime type). This bug could possibly be a security risk as files that include code execution or exploit other security problems are directly opened.
This is important. We should also add a "Save link as" entry to the context menus.
CVS commit by osterfeld: show save|open|cancel dialog for mimetypes we don't handle ourselves CCBUG: 101274 M +1 -1 akregator_run.cpp 1.7 --- kdepim/akregator/src/akregator_run.cpp #1.6:1.7 @@ -47,5 +47,5 @@ void BrowserRun::foundMimeType( const QS m_viewer->openPage(url()); else - KParts::BrowserRun::foundMimeType( type ); + handleNonEmbeddable(type); }
CVS commit by osterfeld: backport: show save|open|cancel dialog for non-html links BUG: 101274 M +1 -0 ChangeLog 1.87.4.2 M +1 -1 src/akregator_run.cpp 1.5.6.2 --- kdepim/akregator/ChangeLog #1.87.4.1:1.87.4.2 @@ -7,4 +7,5 @@ Bug fixes: + - show open|save|cancel dialog for non-html links (101274) - make forms work again (regression) #94964 -fo --- kdepim/akregator/src/akregator_run.cpp #1.5.6.1:1.5.6.2 @@ -47,5 +47,5 @@ void BrowserRun::foundMimeType( const QS m_viewer->openPage(url()); else - KParts::BrowserRun::foundMimeType( type ); + KParts::BrowserRun::handleNonEmbeddable( type ); }
CVS commit by osterfeld: add "save link as" to context menus CCBUG: 101274 M +4 -0 ChangeLog 1.90 M +1 -6 src/pageviewer.cpp 1.37 M +14 -0 src/viewer.cpp 1.44 M +4 -2 src/viewer.h 1.26 --- kdepim/akregator/ChangeLog #1.89:1.90 @@ -6,4 +6,7 @@ ----------------------------- +New features: + - add "Save link as" to context menus -fo + Bug fixes: @@ -11,4 +14,5 @@ - fix regression: non-working forms #94634 -fo + Changes after 1.0b9: ----------------------------- --- kdepim/akregator/src/pageviewer.cpp #1.36:1.37 @@ -340,10 +340,5 @@ void PageViewer::slotPopupMenu(KXMLGUICl popup.insertSeparator(); - - KAction *savelinkas = action("savelinkas"); - - if (savelinkas) - savelinkas->plug( &popup); - + action("savelinkas")->plug(&popup); KAction* copylinkaddress = action("copylinkaddress"); if (copylinkaddress) --- kdepim/akregator/src/viewer.cpp #1.43:1.44 @@ -83,4 +83,7 @@ SIGNAL(popupMenu (KXMLGUIClient*, const this, SLOT(slotCopyLinkAddress()), actionCollection(), "copylinkaddress"); + new KAction(i18n("&Save Link As"), "", 0, + this, SLOT(slotSaveLinkAs()), + actionCollection(), "savelinkas"); } @@ -180,4 +183,6 @@ void Viewer::slotPopupMenu(KXMLGUIClient popup.insertItem(SmallIcon("tab_new"), i18n("Open Link in New &Tab"), this, SLOT(slotOpenLinkInForegroundTab())); popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, SLOT(slotOpenLinkInBrowser())); + popup.insertSeparator(); + action("savelinkas")->plug(&popup); action("copylinkaddress")->plug(&popup); } @@ -238,4 +243,13 @@ void Viewer::slotOpenLinkInBrowser() } +void Viewer::slotSaveLinkAs() +{ + KURL tmp( m_url ); + + if ( tmp.fileName(false).isEmpty() ) + tmp.setFileName( "index.html" ); + KParts::BrowserRun::simpleSave(tmp, tmp.fileName()); +} + void Viewer::slotStarted(KIO::Job *) { --- kdepim/akregator/src/viewer.h #1.25:1.26 @@ -91,4 +91,6 @@ namespace Akregator virtual void slotOpenLinkInBackgroundTab(); + virtual void slotSaveLinkAs(); + /** This changes cursor to wait cursor */ void slotStarted(KIO::Job *);