mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibMarkdown: Escape HTML entities in text
This commit is contained in:
parent
fc3d16d664
commit
0a1ecbec48
Notes:
sideshowbarker
2024-07-19 06:57:00 +09:00
Author: https://github.com/linusg
Commit: 0a1ecbec48
Pull-request: https://github.com/SerenityOS/serenity/pull/2120
2 changed files with 1 additions and 2 deletions
|
@ -60,7 +60,6 @@ String CodeBlock::render_to_html() const
|
||||||
else
|
else
|
||||||
builder.appendf("<code style=\"white-space: pre;\" class=\"%s\">", style_language.characters());
|
builder.appendf("<code style=\"white-space: pre;\" class=\"%s\">", style_language.characters());
|
||||||
|
|
||||||
// TODO: This should also be done in other places.
|
|
||||||
builder.append(escape_html_entities(m_code));
|
builder.append(escape_html_entities(m_code));
|
||||||
|
|
||||||
builder.append("</code>");
|
builder.append("</code>");
|
||||||
|
|
|
@ -113,7 +113,7 @@ String Text::render_to_html() const
|
||||||
}
|
}
|
||||||
|
|
||||||
current_style = span.style;
|
current_style = span.style;
|
||||||
builder.append(span.text);
|
builder.append(escape_html_entities(span.text));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ssize_t i = open_tags.size() - 1; i >= 0; --i) {
|
for (ssize_t i = open_tags.size() - 1; i >= 0; --i) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue