Bug 387421

Summary: User-defined menu: \n interpreted as newline character
Product: [Applications] kile Reporter: nuntius35 <kile-bug>
Component: user interfaceAssignee: Michel Ludwig <michel.ludwig>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 2.9.91   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description nuntius35 2017-11-28 21:35:48 UTC
In the user-defined menu I tried to include a custom command \norm{%C}_{%B}. This does not work as intended, however, because \n is interpreted as a newline sequence. I looked into the xml file of the menu and noticed that \n is used in another entry as a newline sequence. I think that both use cases, a LaTeX command starting with \n and an actual newline, are valid and should both be supported.
Comment 1 Michel Ludwig 2018-01-01 20:12:57 UTC
Git commit 9f97f751639cd9836fcd7b09f0ab003cecd7057e by Michel Ludwig.
Committed on 01/01/2018 at 20:11.
Pushed by mludwig into branch 'master'.

Correctly encode line feed characters (\n) in user menu XML files

M  +3    -3    src/dialogs/usermenu/usermenutree.cpp
M  +11   -11   src/usermenu/usermenu.cpp
M  +21   -0    src/usermenu/usermenudata.cpp
M  +3    -0    src/usermenu/usermenudata.h

https://commits.kde.org/kile/9f97f751639cd9836fcd7b09f0ab003cecd7057e