Skip to content

Using html entities for angle brackets gives different result in react and angular #1586

@lukjab71

Description

@lukjab71

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Preact
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

https://mitosis.builder.io/playground/?code=JYWwDg9gTgLgBAbzgVwM4FMDKMCGN1wC%2BcAZlBCHAEQACARssADYAm6UAdMBAPQjAwIqYKioBuAFAT0AD0iw4bEjmRN4JZADsAxjG6a4AWQCeAYQqRN6TTAAUYcmFQBKRBLge42iJtTwA2po4IOgANHAYMABywegAunAAvCgY2HjotlTY6ABu6FTOku6eUOgwyFAGtsWengA8LMA5AHw1te0NTc0AgpoA5kwEdFA42gDWZaiIAOQAZGpi04QIc30wi8tzC0srs2sbu%2Fs7W%2BtLcHU8jS1ttRdXrbWFEoRAA%3D%3D

Expected Behaviour

The output for both frameworks is identical(I'm writing about react and angular, I did not test other frameworks, this issue might exist elsewhere)

Actual Behaviour

I'm using html entities to represent angle brackets in mitosis jsx(using normal angle brackets breaks the jsx syntax). I noticed different output in react and angular code when I do it. In Angular output entities are separated with a space, even though there is no space in input jsx. In react the output looks fine.

React:
image

Angular:
image

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions