FdoSecrets: fix searching of entries with special characters in attributes

This commit is contained in:
Aetf
2019-12-17 16:34:07 -05:00
committed by Jonathan White
parent 3ffeab4c41
commit af14929af1
3 changed files with 35 additions and 1 deletions

View File

@@ -30,6 +30,7 @@
#include "gui/DatabaseWidget.h"
#include <QFileInfo>
#include <QRegularExpression>
namespace FdoSecrets
{
@@ -273,7 +274,7 @@ namespace FdoSecrets
const auto useWildcards = false;
const auto exactMatch = true;
const auto caseSensitive = true;
term.regex = Tools::convertToRegex(value, useWildcards, exactMatch, caseSensitive);
term.regex = Tools::convertToRegex(QRegularExpression::escape(value), useWildcards, exactMatch, caseSensitive);
return term;
}