History items preamble are modified and include syntax error

Bug #1706529 reported by clagms
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EqualX
New
Undecided
Unassigned

Bug Description

Thank you for coding such a wonderful tool!

This bug can be reproduced as follows:
1. Enter an equation in the equation editor, that includes a custom command. Example:
  \lim_{k\to\infty} \norm{A_{s(k)} A_{s(k-1)} \cdots A_{s(0)} x_0} = 0
2. The equation should not be displayed because the command \norm is a custom one.
3. Append the following definition to the preamble:
  \newcommand{\norm}[1]{\left\lVert #1 \right\rVert}
4. Now the equation should be displayed correctly.
5. The equation should have been recorded in the history.
6. Open the history panel and double click on the newly created entry.
7. Upon restoring this item, the equation is no longer displayed.
8. This is because the new command definition, in the preamble, has been corrupted and should be as follows:
  \newcommand{\norm}[1]{\left\lVert \1 \right\rVert}
(Notice the change #1 --> \1 )

I had a quick look at the code, and this could be due to some sql escape code, but that is just a hunch.

My platform is:
Windows 8.1 x64

EqualX version:
0.7.0 (32 Bits)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.