Title: Lesson Comments Do Not Support Code Block Rendering
Last modified: January 18, 2026

---

# Lesson Comments Do Not Support Code Block Rendering

 *  Resolved [Wijerama](https://wordpress.org/support/users/wijerama/)
 * (@wijerama)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/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?

Viewing 1 replies (of 1 total)

 *  [Maizul](https://wordpress.org/support/users/maizul/)
 * (@maizul)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/lesson-comments-do-not-support-code-block-rendering/#post-18798192)
 * Hey [@wijerama](https://wordpress.org/support/users/wijerama/) ,
 * Thank you for reaching out. The Lesson Comment system in Tutor LMS was not designed
   for code formatting. For security reasons, any HTML or code-like input is sanitized
   following WordPress guidelines, which results in stripped or plain-text output.
 * We understand how this affects programming-focused courses, and we’ve noted your
   feedback.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flesson-comments-do-not-support-code-block-rendering%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/tutor/assets/icon-256x256.gif?rev=3193875)
 * [Tutor LMS - eLearning and online course solution](https://wordpress.org/plugins/tutor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tutor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tutor/)
 * [Active Topics](https://wordpress.org/support/plugin/tutor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tutor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tutor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Maizul](https://wordpress.org/support/users/maizul/)
 * Last activity: [3 months, 2 weeks ago](https://wordpress.org/support/topic/lesson-comments-do-not-support-code-block-rendering/#post-18798192)
 * Status: resolved