Commit 9034243
authored
FIx display of readme/changelog/license in Package Manager (#16829)
### What does it do?
- **Backend:** Removes `htmlspecialchars()` before Parsedown in
`GetAttribute` for readme/changelog/license. Markdown is parsed from raw
text; empty attributes are handled with `$data ?? ''`.
- **Frontend:** For the readme, changelog, and license tabs in Package
Manager, the template uses raw substitution (`{[values.id]}`) so HTML
from Parsedown is rendered without escaping.
- **CSS:** Adds Markdown styles under `.meta-wrapper`: `pre`, `code`,
`pre code`, and `p` (code blocks, inline code, paragraph spacing).
Values use `rem` units.
### Why is it needed?
Readme content during package installation was broken: paragraphs ran
together, backticks and code blocks were not styled, and HTML was shown
as literal text. This was caused by calling `htmlspecialchars()` before
Parsedown and by escaping the resulting HTML in the template.
### How to test
1. Use a package whose readme.txt has paragraphs, `` `inline code` ``, a
fenced code block, and HTML (e.g. `<br/>`).
2. Go to Extras → Install, choose the package, and open the Readme tab.
3. Confirm: paragraphs are spaced, inline and block code are visually
distinct, and HTML is rendered instead of shown as text.
### Related issue(s)/PR(s)
Resolves #162061 parent 208b50a commit 9034243
1 file changed
Lines changed: 5 additions & 2 deletions
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
0 commit comments