Automattic / Automattic/o2

Unable to post comments with <code> tags that include HTML

Open
#129 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
338
Forks
56
Avg merge
24m
Merged PRs (30d)
16

Description

I've tried posting this comment on multiple P2s on WordPress.com (both a8c-flagged, and not, and the comment never publishes. @lancewillett has tested and confirmed this also happens on P2s hosted outside of WordPress.com

`</code>`

(replacing `<code>` with backticks has the same effect.)

Here's a video of what I see just in case it's helpful:
https://cloudup.com/clP72kPU4nd

And an error from the console:
```
Uncaught SyntaxError: Unexpected token <
at eval (<anonymous>)
at s2.wp.com/:2
at Function.globalEval (s2.wp.com/:2)
at Ha (s2.wp.com/:3)
at a.fn.init.prepend (s2.wp.com/:3)
at n.render (s2.wp.com/:7529)
at _ (s2.wp.com/:2089)
at m (s2.wp.com/:2089)
at f (s2.wp.com/:2089)
at n.u.trigger (s2.wp.com/:2089)
```

OS: macOS Sierra 10.12.3 (16D32)
Browser: Chrome Version 56.0.2924.87 (64-bit)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failed comment submission with HTML inside code tags in the comment UI, using the Chrome console trace provided in the issue. Trace the rendering path shown in the stack and verify that the comment publishes successfully without the Unexpected token error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
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.