diff options
Diffstat (limited to 'util.tl')
-rw-r--r-- | util.tl | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 `<sup>[<a href="@link">link</a>]</sup>`))) + pairs)))) |