Bug 71685

Summary: knotes interpretes newline characters (\n) into a real newline
Product: [Applications] knotes Reporter: Thomas Reitelbach <tr>
Component: generalAssignee: Michael Brade <brade>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas Reitelbach 2004-01-02 18:16:38 UTC
Version:           3.0 (using KDE 3.1.94 (CVS >= 20031206), compiled sources)
Compiler:          gcc version 3.3.1
OS:          Linux (i686) release 2.6.0

I just placed some technical documentation into a knotes window.
These technical documentation contained a backslash followed by "n" (\n) which is a symbol for newline.
Unfortunately knotes interpretes this combination of characters.

I closed the note.
then i quit knotes and restart it.
now i open the note which i just wrote a few minutes ago and the \n has disappeared, instead i have one more line in between.

this is the text that i put into a note (without surrounding quotes), you can reproduce the problem with it:
"Geschätzte Kompilierzeit:              \n
Ungefähr benötigter Festplattenplatz:  "

Hopefully this can be fixed soon.
Have a happy new year :-)
Thomas
Comment 1 Michael Brade 2004-03-24 12:41:04 UTC
CVS commit by brade: 

fixed #71685: again a libical bug, it did not encode '\' at all so it was
possible to write control sequences in KNotes, e.g. \n.

Also some non-voluntary trailing whitespace removal (blame kate :)

CCMAIL: 71685-done@bugs.kde.org


  M +124 -123  icalvalue.c   1.13


--- kdepim/libical/src/libical/icalvalue.c  #1.12:1.13
@@ -699,5 +699,6 @@ char* icalvalue_text_as_ical_string(ical
 
             case ';':
-            case ',':{
+            case ',':
+            case '\\': {
                 icalmemory_append_char(&str,&str_p,&buf_sz,'\\');
                 icalmemory_append_char(&str,&str_p,&buf_sz,*p);