Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 799 forks source link

Lists in Markdown don't render/bullets disappear #39605

Open rghedin opened 1 week ago

rghedin commented 1 week ago

Impacted plugin

Jetpack

Quick summary

When writing a comment, a list made of * or - not only doesn't render properly as a HTML list, but also hides those characters. (At least using default comment form.)

Steps to reproduce

  1. Activate Markdown module on Jetpack, and only it.
  2. Browse a blog post with comments open.
  3. Type a list using * or -.

A clear and concise description of what you expected to happen.

What actually happened

Item 1 Item 2 Item 3

Impact

Most (> 50%)

Available workarounds?

No but the platform is still usable

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

phcp commented 6 days ago

📌 REPRODUCTION RESULTS

Replicated only with comments on Atomic sites without using a block-based comment box. I couldn't spot any quick fix other than extending the existing markdown parser used for comments.

📌 FINDINGS/SCREENSHOTS/VIDEO

📌 ACTIONS

rghedin commented 6 days ago

Have you tried edit the comment to use HTML, @phcp? In my site, this workaround doesn't work either. (Although I'm not sure if it's due to some CSS mistake.)

phcp commented 6 days ago

Have you tried edit the comment to use HTML, @phcp? In my site, this workaround doesn't work either. (Although I'm not sure if it's due to some CSS mistake.)

Yes, it worked fine for me. I had to submit the comment, click Edit, and format it as an HTML list.

jeherve commented 4 days ago

Could you go to Jetpack > Settings, search for "markdown", and ensure Markdown is enabled for comments? Once you turn that on, you should see Markdown being processed in your future comments.

Let me know how that goes!

rghedin commented 4 days ago

It is, @jeherve. Markdown works fine in comments, except for lists.

Image

jeherve commented 4 days ago

Thanks for giving it a try! We'll need to look at how data is sanitized by WordPress when submitting a comment. I suspect some HTML, like list items, are getting stripped by WordPress, but we'll see what we can do to fix that!