Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into 'master'
Browse files Browse the repository at this point in the history
[kcalcore] fixes vcalendar export for MER#1604



See merge request !2
  • Loading branch information
pvuorela committed Sep 13, 2016
2 parents eaccc25 + fe425c2 commit 7db97a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
3 changes: 2 additions & 1 deletion kcalcore/klibport/kcodecs.cpp
Expand Up @@ -231,10 +231,11 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool
++lineLength;
}
}
// If we find a line break, just let it through.
// If we find a line break, just don't let it through.
else if ((useCRLF && ('\r' == c) && (i < end) && ('\n' == data[i + 1])) ||
(!useCRLF && ('\n' == c)))
{
cursor += sprintf(cursor, "=0D=0A=");
lineLength = 0;

if (useCRLF) {
Expand Down
15 changes: 2 additions & 13 deletions kcalcore/versit/vobject.c
Expand Up @@ -1147,23 +1147,12 @@ static int writeBase64(OFile *fp, unsigned char *s, unsigned long len)
return 1;
}

/* this function really sucks. Too basic. */
/* this function really sucks. Too basic. ORLY? */
static void writeQPString(OFile *fp, const char *s, int qp)
{
const char *p = s;
while (*p) {
if (*p == '\n') {
/* According to VCAL-1.0 doc, CRLF is the correct separator */
appendsOFile(fp,"=0D=0A=");
/* Continued to also add the \n below */
}
if (*p == '\r') {
/* NOP, handled above [our own may or may not have \rs] */
}
else if (*p == '=' && qp)
appendsOFile(fp,"=3D");
else
appendcOFile(fp,*p);
appendcOFile_(fp,*p);
p++;
}
}
Expand Down

0 comments on commit 7db97a5

Please sign in to comment.