Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'escape-apos'

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
  • Loading branch information...
commit 40e91226b4ce1dfb3c5e7be1750bf56ebb0620bb 2 parents 03dea6e + 8bb7fb6
Thomas Hintz authored
Showing with 6 additions and 3 deletions.
  1. +3 −3 keep-the-records.scm
  2. +3 −0  utils.scm
View
6 keep-the-records.scm
@@ -639,7 +639,7 @@
(number->string (fold (lambda (m c) (+ c 1)) 0 present-clubbers))
(<br>) (<br>)
(fold (lambda (m-name o)
- (++ o (<a> href: (++ "/" club "/clubbers/info/" m-name) (name club m-name)) (<br>)))
+ (++ o (<a> href: (++ "/" club "/clubbers/info/" (html-escape m-name)) (html-escape (name club m-name))) (<br>)))
""
present-clubbers))))
@@ -726,7 +726,7 @@
(<input> type: "text" class: "jq_watermark filter" title: "search" id: "filter")
(<ul> id: "clubber-names" class: "clubbers"
(fold (lambda (e o)
- (++ o (<li> class: "select-clubber-name" id: e (name club e))))
+ (++ o (<li> class: "select-clubber-name" id: (html-escape e) (html-escape (name club e)))))
""
(name-sort club (db:list "clubs" club "clubbers") "last")))))
(<div> class: "grid_6 column-body"
@@ -1498,7 +1498,7 @@
'("Cubbies" "Sparks" "TnT"))))
(db:list "clubs" club "clubbers")) "last")))
(combo-box "clubbers"
- (zip c-out (clubbers->names club c-out))
+ (zip (map (lambda (id) (html-escape id)) c-out) (clubbers->names club c-out))
class: "clubbers" multiple: #t)))))
(<div> class: "grid_9" id: "info-container"
(<div> class: "padding column-header" id: "clubber-name" "Clubber Name")
View
3  utils.scm
@@ -39,3 +39,6 @@
(string-append o (db:sep) e))
""
list))
+
+(define (html-escape s)
+ (string-fold (lambda (c o) (string-append o (if (char=? #\' c) "&apos;" (->string c)))) "" s))
Please sign in to comment.
Something went wrong with that request. Please try again.