mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 08:34:08 +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();
|
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() )
|
||||||
|
|
Loading…
Reference in a new issue