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

Node labels don't render correctly with HTML #65

Closed
lambdamusic opened this issue Mar 20, 2024 · 2 comments
Closed

Node labels don't render correctly with HTML #65

lambdamusic opened this issue Mar 20, 2024 · 2 comments

Comments

@lambdamusic
Copy link

Hello :-)

Can we add HTML to the id and labels?

My data looks this:

      {
        "id": "<strong>Commissioning of the ATLAS Muon Spectrometer with cosmic rays</strong><br />European Physical Journal C ",
        "label": "<strong>Commissioning of the ATLAS Muon Spectrometer with cosmic rays</strong><br />European Physical Journal C ",
        "scores": {
          "_": 1
        },
        "weights": {},
        "cluster": 1,
        "url": "https://app.dimensions.ai/details/publication/pub.1012859014",
        "description": "<div class='description_heading'><a href='https://app.dimensions.ai/details/publication/pub.1012859014' target='_blank'><strong>Commissioning of the ATLAS Muon Spectrometer with cosmic rays</strong><br />European Physical Journal C </a></div>"
      },

But the resulting visualization is not rendering correctly:

image

Full JSON data here: test.json

@lambdamusic lambdamusic changed the title Labels don't render correcty Node labels don't render correctly with HTML Mar 20, 2024
@neesjanvaneck
Copy link
Owner

Hi @lambdamusic! Currently, HTML tags are not supported in the id and label fields. Only descriptions can be formatted with HTML tags.

@neesjanvaneck
Copy link
Owner

Hi @lambdamusic. HTML tags are now automatically stripped from item labels, ensuring clean visualizations. This change also fixed an issue with the find functionality.

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

No branches or pull requests

2 participants