-rw-r--r-- | kabc/vcard/ContentLine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index 2f88cde..0a2f97d 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp @@ -161,8 +161,13 @@ ContentLine::_parse() { vDebug("parse"); + // Unfold folded lines + // NLR + strRep_ = strRep_.replace( QRegExp( "\\r" ), "" ); // Unqote newlines strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" ); + //NLR + strRep_ = strRep_.replace( QRegExp( "\\\\r" ), "\r" ); int split = strRep_.find(':'); @@ -285,6 +290,7 @@ ContentLine::_assemble() if (value_ != 0) line += ":" + value_->asString(); + line = line.replace( QRegExp( "\r" ), "\\r" ); line = line.replace( QRegExp( "\n" ), "\\n" ); // Fold lines longer than 72 chars |