Bug 387421 - User-defined menu: \n interpreted as newline character
Summary: User-defined menu: \n interpreted as newline character
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: user interface (other bugs)
Version First Reported In: 2.9.91
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-28 21:35 UTC by nuntius35
Modified: 2018-01-01 20:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

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