Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
libksieve
Commits
916f2dfb
Commit
916f2dfb
authored
Oct 27, 2016
by
Laurent Montel
Browse files
Fix parsing error when we have < or > in comment
(cherry picked from commit
f046f24e
)
parent
125d96a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ksieveui/scriptsparsing/tests/failed/README-FAILED-INFO
0 → 100644
View file @
916f2dfb
script1.siv failed as parser doesn't like "<" or ">" in comment => I workaround by changed it as double quote
src/parser/lexer.cpp
View file @
916f2dfb
...
...
@@ -385,6 +385,10 @@ bool Lexer::Impl::parseHashComment(QString &result, bool reallySave)
}
if
(
reallySave
)
{
result
+=
QString
::
fromUtf8
(
commentStart
,
commentLength
);
// In comment < or > breaks parsing => convert them to double quote
// See src/ksieveui/scriptsparsing/tests/failed/script1.siv
result
.
replace
(
QLatin1Char
(
'<'
),
QLatin1Char
(
'"'
));
result
.
replace
(
QLatin1Char
(
'>'
),
QLatin1Char
(
'"'
));
}
}
return
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment