diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-05-19 06:42:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-05-19 06:42:32 -0700 |
commit | ad57e84ebb7ed1d650e99027f23821f659a4566d (patch) | |
tree | ee083d11e5384571a9da420d09b9edc447de9746 /util.tl | |
parent | d8570d05b9f554b3e9703994bcd4f3c4534d613e (diff) | |
download | tamarind-ad57e84ebb7ed1d650e99027f23821f659a4566d.tar.gz tamarind-ad57e84ebb7ed1d650e99027f23821f659a4566d.tar.bz2 tamarind-ad57e84ebb7ed1d650e99027f23821f659a4566d.zip |
Get rid of shortening; render URLs.
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)))) |