Add quote, apostrophe to list of chars to html escape

This commit is contained in:
Adam Fowler
2021-03-15 16:40:37 +00:00
parent 03cfa42c02
commit d601a29e35

View File

@@ -4,6 +4,8 @@ extension String {
"<": "&lt;", "<": "&lt;",
">": "&gt;", ">": "&gt;",
"&": "&amp;", "&": "&amp;",
"\"": "&quot;",
"'": "&apos;",
] ]
/// HTML escape string. Replace '<', '>' and '&' with HTML escaped versions /// HTML escape string. Replace '<', '>' and '&' with HTML escaped versions
func htmlEscape() -> String { func htmlEscape() -> String {