Bug 71685 - knotes interpretes newline characters (\n) into a real newline
Summary: knotes interpretes newline characters (\n) into a real newline
Status: RESOLVED FIXED
Alias: None
Product: knotes
Classification: Applications
Component: general (show other bugs)
Version: 3.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Brade
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-02 18:16 UTC by Thomas Reitelbach
Modified: 2004-03-24 12:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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);