Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.41k stars 1.99k forks source link

Map block - HTML in Marker caption breaks map on live site #66502

Open IoanaAMuresan opened 2 years ago

IoanaAMuresan commented 2 years ago

Quick summary

Issue:

  1. no option to add links to individual Markers within the Map Block
  2. Attempting to add HTML will break the map.

Steps to reproduce

1 Added Maps block - on both self-hosted and wpcom sites 2 Added a Marker 3 Added a Marker caption - included a HTML link 4 Saved → checked Preview

What you expected to happen

I didn't expect the link to be clickable (as Support doc mentions it's not possible - and points users to Google maps instead) I did however expect to see the map with the HTML text on the live site

What actually happened

On the WPCOM site: link not clickable, map broken on the live site - see image On self-hosted: link not clickable but map still visible on the live site - with the HTML visible - see image

Self hosted maps test WPCOM maps test

Context

First signalled here: pd4QKa-Ai-p2
Discussed here: p1660221848674699-slack-C0160HSMDQV

Platform (Simple, Atomic, or both?)

Atomic, Self-hosted

Theme-specific issue?

On the WPCOM site - I used Twenty Twenty Two; haven't actually tested other themes

Browser, operating system and other notes

No response

Reproducibility

Consistent

Severity

No response

Available workarounds?

Yes, difficult to implement

Workaround details

Support doc recommend that for clickable links on maps, users should use Google Maps.

However, we might want to fix the error related to adding HTML.

Greatdane commented 2 years ago

📌 SCRUBBING

📌 FINDINGS/SCREENSHOTS/VIDEO

Atomic;

Markup 2022-08-18 at 14 11 16

Simple;

Markup 2022-08-18 at 14 12 07

📌 ACTIONS

IoanaAMuresan commented 2 years ago

On my end, I'm still getting it on a Pro site, Atomic, theme Twenty Twenty-two, @Greatdane . I saved it as a draft, happy to share the link (ping me, please, if you need to have a look).

Greatdane commented 2 years ago

Thank @IoanaAMuresan

Upon further testing, It is not just any HTML that breaks the map, but it looks to be links (href) specifically; <a href="url">link text</a>