Bugzilla Bug 97136 Unable to load filter on space characters

patch by alexey@ihug.com.au r=naving, sr=bienvenu
This commit is contained in:
timeless%mac.com 2001-10-25 03:11:40 +00:00
Родитель a1dd3dfdf8
Коммит 23ec401688
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -367,8 +367,11 @@ nsresult nsMsgSearchTerm::OutputValue(nsCString &outputStr)
if (IS_STRING_ATTRIBUTE(m_attribute) && m_value.string)
{
PRBool quoteVal = PR_FALSE;
// need to quote strings with ')' - filter code will escape quotes
if (PL_strchr(m_value.string, ')'))
// need to quote strings with ')' and strings starting with '"' or ' '
// filter code will escape quotes
if (PL_strchr(m_value.string, ')') ||
(m_value.string[0] == ' ') ||
(m_value.string[0] == '"'))
{
quoteVal = PR_TRUE;
outputStr += "\"";