Lesson Comments Do Not Support Code Block Rendering
-
Hi Team,
We are using Tutor LMS to deliver multiple courses related to programming languages and software development.
In our courses, students frequently use the Lesson Comment section to ask questions related to code snippets. However, we have noticed a major limitation with the current comment system:
*Lesson comments do not support code block rendering
*Any code entered by students is displayed as plain single-line text
*HTML tags such as
<pre>and<code>are stripped or escapedd*Line breaks, indentation, and formatting are lost
As a result, code-related questions become hard to read and understand, which is very inappropriate for programming-focused courses.
We tested:
*WordPress comment filters (
comment_text,get_comment_text)*CSS-based solutions
*Safe HTML wrapping
But it appears that Tutor LMS sanitizes and outputs comment content in a way that prevents proper code block rendering, even when using the default WordPress comment engine.
So, is there an official or recommended way to enable code-block or monospace formatting, like <pre><code>, or Markdown-style code blocks, in Tutor LMS lesson comments, since this feature is essential for programming courses and the current plain-text rendering significantly affects the learning experience?
You must be logged in to reply to this topic.