Problem with Wiki Rich text editor: code block(a pair of backticks) adds excessive escape character before chars.

Summary

Problem with Wiki Rich text editor: code block(a pair of backticks) adds excessive escape character before chars. This problem happens in both SaaS and on-prem.

富文本编辑器问题:富文本编辑器如果编辑了code block(一对backtick)里面的内容,会在code block里面的内容会自动加上多余的转义符。

Steps to reproduce

  1. Create a new Wiki page/Choose an existing Wiki page inside Project Wiki or Group Wiki.
  2. Input the following content (or any content with code blocks) inside Source editor.
# 使用 富文本 编辑器,在code block(一对backtick)里面的内容会自动加上多余的转义符

分支命名规则: `feat/*`

其它分支不触发: `fix/*`, `misc/*`

带了一个转义字符: `feat\/*`
  1. Switch to Rich text editor, Change the content in the code block as to this following picture: (Trigger: you have to use the rich text's code block capability to trigger this bug. I have revised the last line)

image

  1. Click Save changes and get the problem: code block(a pair of backticks) adds excessive escape character before chars:

image

Example Project

It doesn't have to be a specific project, but here's some reference:

https://jihulab.com/groups/premium-plan/features/03Create/group-wikis/-/wikis/%E5%88%86%E6%94%AF%E8%A7%84%E5%88%99

https://jhgitlab.com/groups/premium-plan/features/03Create/-/wikis/home

What is the current bug behavior?

In rich text editor, if I have changed anything inside the code block, all code block will add excessive escape characters before chars such as (*).

What is the expected correct behavior?

In rich text editor, if I have changed anything inside the code block, the saved content should be what I have seen. That's the spirit of WYSIWYG

Relevant logs and/or screenshots

N/A

Output of checks

This problem happens in both SaaS and on-prem.

Results of GitLab environment info

N/A

Results of GitLab application Check

N/A

Possible fixes

N/A

Customer

Customer has sent me a video demonstrating this problem. As this contain customer info, I posted it on the following link