[Kst] [Bug 293247] New: Some labels are not properly escaped
nicolas.brisset at eurocopter.com
Fri Feb 3 21:59:40 UTC 2012
Summary: Some labels are not properly escaped
Platform: Compiled Sources
AssignedTo: kst at kde.org
ReportedBy: nicolas.brisset at eurocopter.com
Legend items and left labels (units) are not properly escaped: e.g. _ gets
interpreted as the beginning of a subscript.
Steps to Reproduce:
- Modify a unit in TWIN1xxx and TWIN2xxx from the sample_data/ subdir of the
kst source tree, e.g. Torq_req from N.m to N_m
- load Torq_req vs Time from TWIN1xxx
- duplicate with the change data file tool to show Torq_req from TWIN2 as well
- activate "Show legend"
1) The file path in the legend is not properly escaped (sample_*d*ata has d as
2) The unit in the left label is not properly escaped
All strings should be properly escaped
Those are 2 concrete examples, but I think there are other places with similar
issues. Barth, I'd appreciate if you could have a look at that because I don't
have the overview how this works.
I think the right way to handle it would be to create a global method to escape
strings before passing them to the renderer, something like "static QString
KstString::escape(const QString& inString)" like QRegExp::escape().
We could then store unescaped string in all objects (names etc) and escape them
just before rendering.
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kst