zooniverse / Panoptes-Front-End

Front end for zooniverse/Panoptes
https://www.zooniverse.org
Apache License 2.0
64 stars 75 forks source link

Markdown isn't parsed in Safari #7056

Closed eatyourgreens closed 3 months ago

eatyourgreens commented 3 months ago

Expected behavior

Markdown should be parsed and rendered as HTML.

Current behavior

Components show the raw Markdown string. This is the default behaviour in markdownz when the JS errors. https://github.com/zooniverse/markdownz/blob/0c2db1ad8a692fd9d677b95342691929544b0a0d/src/lib/utils.js#L93-L98

Screenshots in Safari 17.3

A Talk comment.

A Talk comment rendered as one long string, with no paragraph breaks, links or text formatting.

A field guide entry.

A field guide entry, displayed as raw markdown, without images or formatting.

Additional information

In debugging mode, the Markdown component shows the error message:

e.propertyIsEnumerable is not a function. (In 'e.propertyIsEnumerable(t)', 'e.propertyIsEnumerable' is undefined)
A screenshot of a field guide item, showing the JavaScript error message instead of its markdown content.

The stack trace shows that error is thrown in polyfill.min.js, which should really be removed (#7051.)

Stack trace for the markdown error in the Safari developer console, showing that it's thrown in the broken polyfill.min.js code.