diff --git a/routes.go b/routes.go
index cb4320b..308c675 100644
--- a/routes.go
+++ b/routes.go
@@ -459,6 +459,15 @@ func renderList(c *gin.Context, title string) {
pClean.AllowDataURIImages()
text := pClean.SanitizeBytes([]byte(p.CurrentText))
listItems, _ := reorderList(string(text))
+ for i := range listItems {
+ newHTML := strings.Replace(string(listItems[i]), "", ""+``, -1)
+ newHTML = strings.Replace(newHTML, "", ""+``, -1)
+ newHTML = strings.Replace(newHTML, "", "", -1)
+ newHTML = strings.Replace(newHTML, "
"+``, ""+``, -1)
+ newHTML = strings.Replace(newHTML, "", "", -1)
+ listItems[i] = template.HTML([]byte(newHTML))
+ }
c.HTML(http.StatusOK, "list.tmpl", gin.H{
"Title": title,
"WikiName": RuntimeArgs.WikiName,
diff --git a/templates/list.tmpl b/templates/list.tmpl
index a89e84e..eae054a 100644
--- a/templates/list.tmpl
+++ b/templates/list.tmpl
@@ -11,6 +11,7 @@
padding: 0;
list-style-type: none;
}
+span { cursor: pointer; }
@@ -45,7 +46,7 @@
{{ range $index, $element := .ListItems }}
- {{ $element }}
+ {{ $element }}
{{ end }}
@@ -54,9 +55,6 @@
$('.deletable').click(function(event) {
event.preventDefault();
var lineNum = $(this).attr('id')
- var href = $(this).attr('href')
- if (href == "#") {
- console.log(lineNum)
$.ajax({
url: "/listitem" + '?' + $.param({
"lineNum": lineNum,
@@ -67,8 +65,6 @@
window.location.reload(true);
}
});
- }
-
});
$(document).keydown(function(e){