Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special characters like "&" not working properly #3403

Closed
2 tasks done
nbelyh opened this issue Mar 3, 2023 · 7 comments
Closed
2 tasks done

Special characters like "&" not working properly #3403

nbelyh opened this issue Mar 3, 2023 · 7 comments
Labels
Projects

Comments

@nbelyh
Copy link

nbelyh commented Mar 3, 2023

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug
Text is broken when using underline with "special" characters like "&" (ampersand)
See the video below.

To Reproduce
Steps to reproduce the behavior:

  1. Drop a rectangle on the screen
  2. Uncheck "Formatted text" (this is important, when "formatted text" is on it works properly)
  3. Set rectangle text to "A&B"
  4. Click "Underline" button
  5. See error: "A&B" is changed to "A&B"

Expected behavior
The text stays "A&B"

Screenshots
image

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 21.0.2 (online)

Desktop (please complete the following information):

  • ALL

Smartphone (please complete the following information):

  • ALL
@davidjgraph
Copy link
Collaborator

This doesn't happen for me using 21.0.2 on any browser. Is this private/incognito with all extensions off?

@nbelyh
Copy link
Author

nbelyh commented Mar 3, 2023

@davidjgraph
I just filmed it five minutes ago using the latest Chrome, and the current online version (diagrams.net website)
Please make sure you turned OFF the "Formatted Text" checkbox, this is important (please follow the steps in the description)

@davidjgraph davidjgraph added the bug label Mar 3, 2023
@davidjgraph davidjgraph added this to Triage in drawio via automation Mar 3, 2023
@nbelyh
Copy link
Author

nbelyh commented Mar 3, 2023

@davidjgraph yes, reproducible also in private, with all extensions off.
Actually, it is a very old bug. Just reporting some things we encountered in a while :)

@alderg
Copy link
Contributor

alderg commented Mar 6, 2023

Thanks for the report. This will be fixed in the next release.

@alderg alderg closed this as completed Mar 6, 2023
@nbelyh
Copy link
Author

nbelyh commented Mar 6, 2023

@alderg sounds great! Could you give some details on how it was fixed (so that the fix can be reused in a fork like maxgraph for example?)

@alderg
Copy link
Contributor

alderg commented Mar 6, 2023

Line 9426 in Graph.js was changed as follows:

Screenshot 2023-03-06 at 18 44 51

@davidjgraph
Copy link
Collaborator

Fixed in 21.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
drawio
  
Triage
Development

No branches or pull requests

3 participants