summaryrefslogtreecommitdiffstats
path: root/vendor/gsgdt/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gsgdt/src/util.rs')
-rw-r--r--vendor/gsgdt/src/util.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/gsgdt/src/util.rs b/vendor/gsgdt/src/util.rs
new file mode 100644
index 000000000..f6fcf08f6
--- /dev/null
+++ b/vendor/gsgdt/src/util.rs
@@ -0,0 +1,6 @@
+pub fn escape_html(s: &str) -> String {
+ s.replace("&", "&")
+ .replace("\"", """)
+ .replace("<", "&lt;")
+ .replace(">", "&gt;")
+}