aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/utilities')
-rw-r--r--core/src/main/kotlin/utilities/Html.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/kotlin/utilities/Html.kt b/core/src/main/kotlin/utilities/Html.kt
index 3226ca9d..874c9fb1 100644
--- a/core/src/main/kotlin/utilities/Html.kt
+++ b/core/src/main/kotlin/utilities/Html.kt
@@ -7,9 +7,9 @@ import java.net.URLEncoder
* Replaces symbols reserved in HTML with their respective entities.
* Replaces & with &amp;, < with &lt; and > with &gt;
*/
-fun String.htmlEscape(): String = replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+fun String.htmlEscape(): String = replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;")
fun String.urlEncoded(): String = URLEncoder.encode(this, "UTF-8")
fun String.formatToEndWithHtml() =
- if (endsWith(".html") || contains(Regex("\\.html#"))) this else "$this.html" \ No newline at end of file
+ if (endsWith(".html") || contains(Regex("\\.html#"))) this else "$this.html"