Automattic / Automattic/jetpack

Odd behavior of '>' (greater-than) in Markdown Block

Open
#24,271 2 comments 0 reactions 0 assignees View on GitHub
[Block] Markdown [Pri] Low Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

None / Other

### Steps to Reproduce

I wasn't able to replicate this on a private site, but on any given P2 if I add a Markdown block with '>' for quotes or in code blocks(i.e. ```) then save the draft the block alters the '>' and messes up the final rendering.

See demo:
![image](https://user-images.githubusercontent.com/6424653/166937139-a8d78f17-ab72-41ae-b440-5e00f6727bfd.png)
https://d.pr/i/pNg43S

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

When adding '>', it should not corrupt the Markdown block and should parse it back appropriately instead of replacing it with an HTML entity(as a quote or in a code block as simply '>').

### What actually happened

The '>' got replaced by it's HTML entity equivalent and corrupted the Markdown block.

### Other information

_No response_

### Operating System

macOS

### OS Version

Monterey

### Browser

Firefox

### Browser Version(s)

Version 99

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Reproduce the issue by saving a Markdown block on a P2 containing greater-than signs in quotes and fenced code, then verify that the characters remain intact and render correctly after saving.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.