mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Replace reserved characters when make filename to save article
This commit is contained in:
parent
04ddee6789
commit
64e364f48c
|
@ -3224,7 +3224,12 @@ void MainWindow::on_saveArticle_triggered()
|
|||
{
|
||||
ArticleView *view = getCurrentArticleView();
|
||||
|
||||
QString fileName = view->getTitle() + ".html";
|
||||
QString fileName = view->getTitle();
|
||||
|
||||
// Replace reserved filename characters
|
||||
fileName.replace( QRegExp( "[/\\\\\\?\\*:\\|<>]" ), "_" );
|
||||
|
||||
fileName += ".html";
|
||||
QString savePath;
|
||||
|
||||
if ( cfg.articleSavePath.isEmpty() )
|
||||
|
|
Loading…
Reference in a new issue