jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
55 stars 29 forks source link

[Bug]: Character `<` inside variable values messes up their display #2778

Closed JoKeyser closed 1 week ago

JoKeyser commented 1 week ago

JASP Version

0.19

Commit ID

2f53f98b336720bfb44241df4145741a46b1d75e

JASP Module

Unrelated

What analysis are you seeing the problem on?

The data viewer

What OS are you seeing the problem on?

Ubuntu 22.04.4 LTS, Flatpak 1.14.4.

Bug Description

The character < messes up the display in JASP's variable view: Itself, and anything right of that character is not displayed.

Here is a rather minimal CSV file to reproduce the issue: test.csv, and below its content as plain text:

colA,colB
a,b
<,>
a<a,b>b

Here is what JASP shows in the variable view:

jasp-data-view1

If you click on the messed-up field, the value shows up correctly, see below (so it's probably just the view/rendering that is messed up?):

jasp-data-view2

Note that this is a random finding from actual data "in the wild" (the "Wild West" of teaching, to be exact). I have made no effort to look if other characters have a similar effect. Maybe there is some sort of unwanted "code interpretation" of the values going on, since < may be interpreted as a beginning HTML tag?

Expected Behaviour

The variable values should be rendered correctly, "as they are".

Steps to Reproduce

  1. Load a data set that contains < as variable values.
  2. Look at these values in the data view, and see they are not displayed

Log (if any)

Here the logs of me opening JASP and loading the example test.csv above.

JASP 2024-06-13 09_41_56 Engine 0.log JASP 2024-06-13 09_41_56 Desktop.log

Final Checklist

boutinb commented 1 week ago

Hmm strange, if I load such a file, it works for me (MacOS). Can someone else reproduce this issue?

tomtomme commented 1 week ago

yes, can confirm for 0.18.3 and 0.19beta on manjaro linux.

shun2wang commented 1 week ago

Maybe there is some sort of unwanted "code interpretation" of the values going on, since < may be interpreted as a beginning HTML tag?

Good point!

shun2wang commented 1 week ago

OK, it was because the text was set as richText format (now plaintext), and already fixed by @JorisGoosen in https://github.com/jasp-stats/jasp-desktop/commit/e6d1b25ed86fc23da5abe238203744a92ad282a2 , flatpak build is not latest commit.

Thanks for the report!