Render ticket descriptions as markdown (#114)
Lint / JS (eslint) (push) Successful in 17s
Lint / PHP requirements (version + extensions) (push) Successful in 39s
Lint / JS (eslint) (pull_request) Successful in 33s
Lint / PHP (phpcs PSR-12) (pull_request) Successful in 1m3s
Lint / PHP requirements (version + extensions) (pull_request) Successful in 58s
Lint / Deploy (pull_request) Skipped
Lint / Notify on failure (pull_request) Skipped
Security / PHP Security (semgrep) (push) Successful in 2m52s
Security / PHP Security (semgrep) (pull_request) Successful in 3m2s
Lint / PHP (phpcs PSR-12) (push) Successful in 48s
Lint / Deploy (push) Skipped
Lint / Notify on failure (push) Skipped
Lint / JS (eslint) (push) Successful in 17s
Lint / PHP requirements (version + extensions) (push) Successful in 39s
Lint / JS (eslint) (pull_request) Successful in 33s
Lint / PHP (phpcs PSR-12) (pull_request) Successful in 1m3s
Lint / PHP requirements (version + extensions) (pull_request) Successful in 58s
Lint / Deploy (pull_request) Skipped
Lint / Notify on failure (pull_request) Skipped
Security / PHP Security (semgrep) (push) Successful in 2m52s
Security / PHP Security (semgrep) (pull_request) Successful in 3m2s
Lint / PHP (phpcs PSR-12) (push) Successful in 48s
Lint / Deploy (push) Skipped
Lint / Notify on failure (push) Skipped
The ticket page escaped descriptions to plain text, so headings, lists, tables, bold and code from Gandalf, MCP and manual tickets showed raw. renderDescriptionView() now uses parseMarkdown(), the same sanitising parser as comments, and the view drops pre-wrap for normal white space like markdown comments do. The edit view still shows the raw source. The parser also no longer treats underscores inside words as emphasis, so identifiers like node_network_up stay literal (in comments too). hwmonDaemon's fixed-width box layout loses its alignment as markdown; LotusGuild/hwmonDaemon#38 switches it to markdown and converts its past tickets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aad3e8eb44
commit
fb2df0ee49
4 files changed
+11
-8
No files matched your search
+3
-3
@@ -89,9 +89,9 @@ function renderDescriptionView() {
|
||||
if (!raw.trim()) {
|
||||
viewDiv.innerHTML = '<p class="lt-text-muted lt-text-sm"><em>No description provided.</em></p>';
|
||||
} else {
|
||||
// Ticket descriptions are plain text. CSS white-space:pre-wrap handles
|
||||
// line breaks and multiple spaces (ASCII art) — no <br> replacement needed.
|
||||
viewDiv.innerHTML = lt.escHtml(raw);
|
||||
// Descriptions are markdown, rendered like comments (#114).
|
||||
// parseMarkdown() escapes HTML first and allowlists link protocols.
|
||||
viewDiv.innerHTML = parseMarkdown(raw);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user