Replace reserved characters when make filename to save article

This commit is contained in:
Abs62 2015-03-22 19:48:56 +03:00
parent 04ddee6789
commit 64e364f48c

View file

@ -3224,7 +3224,12 @@ void MainWindow::on_saveArticle_triggered()
{ {
ArticleView *view = getCurrentArticleView(); ArticleView *view = getCurrentArticleView();
QString fileName = view->getTitle() + ".html"; QString fileName = view->getTitle();
// Replace reserved filename characters
fileName.replace( QRegExp( "[/\\\\\\?\\*:\\|<>]" ), "_" );
fileName += ".html";
QString savePath; QString savePath;
if ( cfg.articleSavePath.isEmpty() ) if ( cfg.articleSavePath.isEmpty() )