lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.68k stars 2.28k forks source link

Blog : Uneditable with markdown table having a header of <!-- --> #15898

Open TBestLittleHelper opened 3 months ago

TBestLittleHelper commented 3 months ago

Exact URL of where the bug happened

It's easy to reproduce, but if you can see a draft blog here is a link Draft test blog : https://lichess.org/ublog/Jk3PTtrL/edit

Steps to reproduce the bug

Create a draft blog. Insert a markdown table. Put <!-- --> in the header

What did you expect to happen?

Should be possible to edit the blogt

What happened instead?

Blog is uneditable and we have a console error.

/ublog/Jk3PTtrL/edit - TypeError: Cannot read properties of null (reading '1') common.RRR7GR2D.js:37 Uncaught (in promise) TypeError: Cannot read properties of null (reading '1') at htmlInline (common.RRR7GR2D.js:37:6410) at a (common.RRR7GR2D.js:38:70) at r.convert (common.RRR7GR2D.js:38:285) at r.convertNode (common.RRR7GR2D.js:38:340) at r.toWysiwygModel (common.RRR7GR2D.js:47:677) at r.setMarkdown (common.RRR7GR2D.js:47:15755) at e.r (common.RRR7GR2D.js:47:13058) at new e (common.RRR7GR2D.js:617:711) at f (bits.ublogForm.WNAKVYFU.js:2:9) at HTMLDivElement. (bits.ublogForm.WNAKVYFU.js:1:533) image

Operating system

win11

Browser and version (or alternate access method)

chrome

Additional information

Reported in discord : https://discord.com/channels/280713822073913354/1273016195855024128/1273016195855024128

allanjoseph98 commented 3 months ago

Issue is upstream with toastui https://github.com/nhn/tui.editor/issues/2795

niklasf commented 1 month ago

Until the upstream issue is solved, #16170 could be used to disable WYSIWYG mode on a blog post without the issue.