HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.38k stars 2.41k forks source link

Highlighting emojis in Text tags is showing strange Glyphs � #6057

Open jheyming opened 4 months ago

jheyming commented 4 months ago

Describe the bug

If you have emojis in Text data, highlighting them generates glyphs � image

I found that if I turn off FF_LSDV_4620_3, the issue goes away: image

The issue seems to be

        self._spans = self.parent.createSpansByGlobalOffsets(self.globalOffsets);

https://github.com/HumanSignal/label-studio/blob/develop/web/libs/editor/src/mixins/HighlightMixin.js#L70

The spans that are generated have strange \u characters.

To Reproduce Steps to reproduce the behavior:

  1. Import a task with emojis
  2. Make your project have a <Text> tag with <Lables>.
  3. Select any label, then highlight the emoji
  4. see the glyph

Expected behavior The emojis are properly highlighted

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

jombooth commented 3 months ago

/jira create

Workflow run Jira issue TRIAG-764 is created

jombooth commented 3 months ago

Hi @jheyming, nice catch on that feature flag - can you also let us know what version of Label Studio you're currently on? We'll investigate.