summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/html.fnl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/html.fnl b/lib/html.fnl
new file mode 100644
index 0000000..9cf7b3a
--- /dev/null
+++ b/lib/html.fnl
@@ -0,0 +1,10 @@
+(fn unescape [s]
+ (assert (= (type s) :string) "s must be string")
+ (pick-values 1
+ (-> s
+ (string.gsub "&lt;" "<")
+ (string.gsub "&gt;" ">")
+ (string.gsub "&quot;" "\"")
+ (string.gsub "&amp;" "&"))))
+
+{ : unescape }