aboutsummaryrefslogtreecommitdiff
path: root/plugins/gfm/src/main/kotlin
diff options
context:
space:
mode:
authorvmishenev <vad-mishenev@yandex.ru>2021-08-30 17:40:02 +0300
committervmishenev <vad-mishenev@yandex.ru>2021-08-30 18:54:19 +0300
commit70448a0797202f91778c35ecd6adf4b36c95897d (patch)
tree948409a1f259fd37e06d92a28136b55fbb496646 /plugins/gfm/src/main/kotlin
parenta74b3c1cabde1dad3e91f804a89a90398dba1932 (diff)
downloaddokka-70448a0797202f91778c35ecd6adf4b36c95897d.tar.gz
dokka-70448a0797202f91778c35ecd6adf4b36c95897d.tar.bz2
dokka-70448a0797202f91778c35ecd6adf4b36c95897d.zip
Escape text for GFM
Diffstat (limited to 'plugins/gfm/src/main/kotlin')
-rw-r--r--plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt b/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt
index e940fffd..c05bd07e 100644
--- a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt
+++ b/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt
@@ -11,6 +11,7 @@ import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.query
+import org.jetbrains.dokka.utilities.htmlEscape
open class CommonmarkRenderer(
context: DokkaContext
@@ -214,7 +215,7 @@ open class CommonmarkRenderer(
val decorators = decorators(textNode.style)
append(textNode.text.takeWhile { it == ' ' })
append(decorators)
- append(textNode.text.trim())
+ append(textNode.text.trim().htmlEscape())
append(decorators.reversed())
append(textNode.text.takeLastWhile { it == ' ' })
}