Description
Pasting text containing Markdown syntax (e.g. #) into the post title field results in loss of the original characters due to unintended Markdown conversion.
Step-by-step reproduction instructions
- Create a new post.
- Click into the post title field. Open the browser console
- Paste the following text:
# 3 reason why
Expected Behavior
The title field should treat input as plain text and preserve all characters exactly as pasted
Actual Behavior
The pasted text is interpreted as Markdown and converted into a heading
Console
Received HTML (pasteHandler):
<html>
<body>
<!--StartFragment--><span style="color: rgb(255, 255, 255); font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 11.9px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: break-spaces; background-color: rgb(33, 40, 48); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"># 3 reason why</span><!--EndFragment-->
</body>
</html>
paste-handler.ts:40 Received plain text (pasteHandler):
# 3 reason why
paste-handler.ts:40 Processed HTML piece:
<h1>3 reason why</h1>
Screenshots, screen recording, code snippet
No response
Environment info
WP 7.0, default GB editor, TT5, GeneratePress
Chromium, Win 10
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
Description
Pasting text containing Markdown syntax (e.g.
#) into the post title field results in loss of the original characters due to unintended Markdown conversion.Step-by-step reproduction instructions
# 3 reason whyExpected Behavior
The title field should treat input as plain text and preserve all characters exactly as pasted
Actual Behavior
The pasted text is interpreted as Markdown and converted into a heading
Console
Screenshots, screen recording, code snippet
No response
Environment info
WP 7.0, default GB editor, TT5, GeneratePress
Chromium, Win 10
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.