From ab02673643d2a127152e295c78792f6821ee5960 Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Tue, 5 Nov 2019 17:59:11 +0100 Subject: Escaping for html --- core/src/main/kotlin/renderers/HtmlRenderer.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/renderers/HtmlRenderer.kt b/core/src/main/kotlin/renderers/HtmlRenderer.kt index b6d56fdc..9b76f719 100644 --- a/core/src/main/kotlin/renderers/HtmlRenderer.kt +++ b/core/src/main/kotlin/renderers/HtmlRenderer.kt @@ -1,5 +1,6 @@ package org.jetbrains.dokka.renderers +import org.jetbrains.dokka.htmlEscape import org.jetbrains.dokka.pages.ContentLink import org.jetbrains.dokka.pages.ContentNode import org.jetbrains.dokka.pages.PageNode @@ -15,10 +16,12 @@ open class HtmlRenderer(fileWriter: FileWriter, locationProvider: LocationProvid override fun buildNewLine(): String = "
" - override fun buildLink(text: String, address: String): String = "$text" + override fun buildLink(text: String, address: String): String = "${text.htmlEscape()}" override fun buildCode(code: String): String = "$code" + override fun buildText(text: String) = super.buildText(text).htmlEscape() + override fun buildNavigation(): String = "" // TODO implement override fun buildGroup(children: List, pageContext: PageNode): String = -- cgit