[Kst] [Bug 293247] New: Some labels are not properly escaped

Nicolas Brisset nicolas.brisset at eurocopter.com
Fri Feb 3 21:59:40 UTC 2012


           Summary: Some labels are not properly escaped
           Product: kst
           Version: 2.0.4
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kst at kde.org
        ReportedBy: nicolas.brisset at eurocopter.com

Version:           2.0.4
OS:                Linux

Legend items and left labels (units) are not properly escaped: e.g. _ gets
interpreted as the beginning of a subscript.

Reproducible: Always

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" 

Actual Results:  
1) The file path in the legend is not properly escaped (sample_*d*ata has d as
a subscript)
2) The unit in the left label is not properly escaped

Expected Results:  
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 mailing list