"regexp"
"strconv"
"strings"
+ "html/template"
"time"
)
return Sanitize(strings.ToLower(strings.Replace(strings.TrimSpace(url), " ", "-", -1)))
}
+func AbsUrl(url string, base string) template.HTML {
+ if strings.HasPrefix(url, "http://") || strings.HasPrefix(url, "https://") {
+ return template.HTML(url)
+ }
+ return template.HTML(MakePermalink(base, url))
+}
+
func Gt(a interface{}, b interface{}) bool {
var left, right int64
av := reflect.ValueOf(a)