mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
vdoc: escape tags in highlighted html (#19731)
This commit is contained in:
parent
d33e7e7903
commit
59660746dd
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
fn (f &MdHtmlCodeHighlighter) transform_content(parent markdown.ParentType, text string) string {
|
||||||
if parent is markdown.MD_BLOCKTYPE && parent == .md_block_code {
|
if parent is markdown.MD_BLOCKTYPE && parent == .md_block_code {
|
||||||
if f.language == 'v' || f.language == 'vlang' {
|
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) {
|
fn (mut f MdHtmlCodeHighlighter) config_set(key string, val string) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue