From ad57e84ebb7ed1d650e99027f23821f659a4566d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 19 May 2016 06:42:32 -0700 Subject: Get rid of shortening; render URLs. --- util.tl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util.tl') diff --git a/util.tl b/util.tl index 71fc985..e987423 100644 --- a/util.tl +++ b/util.tl @@ -21,3 +21,11 @@ (defun move-tail (items keys) (move-impl items keys (length items))) + +(defun html-encode-with-http (str) + (let* ((pairs (tuples 2 (tok-str str #/https?:\/\/\S+/ t)))) + (cat-str + (mappend (tb ((text : link)) + (list (html-encode text) + (if link `[link]`))) + pairs)))) -- cgit v1.2.3