aboutsummaryrefslogtreecommitdiff
path: root/lib/util.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-04-23 15:59:42 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-04-23 20:57:26 -1000
commita448b261d6bffa420d1f0c4d57ebe852146001bf (patch)
tree8631f13ee17b8ddf8dbead146bb47e0f6d73605f /lib/util.js
parentbe330fa3f2c5d90bbdcb9fd1ba45c550fac244a1 (diff)
downloadpatchfoo-a448b261d6bffa420d1f0c4d57ebe852146001bf.tar.gz
patchfoo-a448b261d6bffa420d1f0c4d57ebe852146001bf.zip
Fix double-html-escaped href
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util.js b/lib/util.js
index 15eb295..b80ea04 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -222,3 +222,7 @@ u.unescapeId = function (str) {
u.rows = function (str) {
return String(str).split(/[^\n]{150}|\n/).length
}
+
+u.token = function () {
+ return '__' + Math.random().toString(36).substr(2) + '__'
+}