Skip to content

Commit

Permalink
vdoc: escape tags in highlighted html (#19731)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Nov 2, 2023
1 parent d33e7e7 commit 5966074
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/tools/vdoc/html.v
Expand Up @@ -534,10 +534,10 @@ fn (f &MdHtmlCodeHighlighter) transform_attribute(p markdown.ParentType, name st
fn (f &MdHtmlCodeHighlighter) transform_content(parent markdown.ParentType, text string) string {
if parent is markdown.MD_BLOCKTYPE && parent == .md_block_code {
if f.language == 'v' || f.language == 'vlang' {
return html_highlight(text, f.table)
return html_highlight(html_tag_escape(text), f.table)
}
}
return markdown.default_html_transformer.transform_content(parent, text)
return markdown.default_html_transformer.transform_content(parent, html_tag_escape(text))
}

fn (mut f MdHtmlCodeHighlighter) config_set(key string, val string) {
Expand Down

0 comments on commit 5966074

Please sign in to comment.