question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Infowindows behaviour turns weird when you edit the HTML behind

See original GitHub issue

Context

The default parsing/rendering behavior of the infowindows is overridden when user apply any change to the infowindow template using the HTML editor.

Steps to Reproduce

  1. Take any dataset with some string column
  2. Edit that string for an specific row and add HTML code to it, something like
<p><strong>The Puxa Gallery, in the district of Las Salesas, is a modern art gallery, offering a glimpse into its participation in international art fairs and its firm commitment to supporting emerging artists.</strong></p><p>At the helm of this space are Nuria Misert, former director of the Galería Marlborough Madrid, and Ángel Antonio Rodríguez, journalist and art critic. Ardent defenders of freedom from indoctrination, in favour of permanent debate, they seek to disseminate the work of new artists whilst promoting their dialogue with emblematic authors from other generations.</p>
  1. In a different row, set that column to NULL
  2. Create a map from it
  3. Add an infowindow to the layer, and select at least the string column above
  4. Check the infowindows of both features
  5. Go to HTML editor for the infowindow, add an space at the end and apply the changes
  6. Check the infowindows of both features again

Current Result

(step 8)

  • The infowindow of the feature @ step 2 displays HTML tags in the linked field
  • The infowindow of the feature @ step 3 displays the column title and NULL or empty string value

Expected result

(step 6)

  • The infowindow of the feature @ step 2 displays plain text, the tags have been sanitized
  • The infowindow of the feature @ step 3 if the column value is null, the linked field is not displayed at all (not even the title)

Browser and version

Not relevant

.carto file

Not needed

Additional info

cc @piensaenpixel

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AbelVMcommented, Jul 31, 2018

F*CK U STALE BOT

:trollface:

1reaction
xavijamcommented, Jul 17, 2017

Doing then the second point 💋 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Maps API v3: InfoWindow not sizing correctly
When the API tries to take the measurements for your infoWindow (immediately before displaying it), the h1 part of the content will have...
Read more >
Info Windows | Maps JavaScript API - Google Developers
An InfoWindow displays content (usually text or images) in a popup window above the map, at a given location. The info window has...
Read more >
Adding a way so that the InfoWindow can get a path to an html ...
Today I wanted to style and make an InfoWindow for my marker, but it was pretty weird/difficult to design. I think that having...
Read more >
Adding Descriptions to Digital Photos | The Signal
Photography professionals routinely use photo-editing software to add photometadata to their digital photos for copyright and business reasons.
Read more >
Info windows and graphics | ArcGIS API for JavaScript 3.42
The default behavior when a graphic or feature layer is clicked is to show an info window. However, in order for this to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found