Skip to content
This repository
Browse code

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 2 changed files with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 keep-the-records.scm
  2. +3 0  utils.scm
6 keep-the-records.scm
@@ -639,7 +639,7 @@
639 639 (number->string (fold (lambda (m c) (+ c 1)) 0 present-clubbers))
640 640 (<br>) (<br>)
641 641 (fold (lambda (m-name o)
642   - (++ o (<a> href: (++ "/" club "/clubbers/info/" m-name) (name club m-name)) (<br>)))
  642 + (++ o (<a> href: (++ "/" club "/clubbers/info/" (html-escape m-name)) (html-escape (name club m-name))) (<br>)))
643 643 ""
644 644 present-clubbers))))
645 645
@@ -726,7 +726,7 @@
726 726 (<input> type: "text" class: "jq_watermark filter" title: "search" id: "filter")
727 727 (<ul> id: "clubber-names" class: "clubbers"
728 728 (fold (lambda (e o)
729   - (++ o (<li> class: "select-clubber-name" id: e (name club e))))
  729 + (++ o (<li> class: "select-clubber-name" id: (html-escape e) (html-escape (name club e)))))
730 730 ""
731 731 (name-sort club (db:list "clubs" club "clubbers") "last")))))
732 732 (<div> class: "grid_6 column-body"
@@ -1498,7 +1498,7 @@
1498 1498 '("Cubbies" "Sparks" "TnT"))))
1499 1499 (db:list "clubs" club "clubbers")) "last")))
1500 1500 (combo-box "clubbers"
1501   - (zip c-out (clubbers->names club c-out))
  1501 + (zip (map (lambda (id) (html-escape id)) c-out) (clubbers->names club c-out))
1502 1502 class: "clubbers" multiple: #t)))))
1503 1503 (<div> class: "grid_9" id: "info-container"
1504 1504 (<div> class: "padding column-header" id: "clubber-name" "Clubber Name")
3  utils.scm
@@ -39,3 +39,6 @@
39 39 (string-append o (db:sep) e))
40 40 ""
41 41 list))
  42 +
  43 +(define (html-escape s)
  44 + (string-fold (lambda (c o) (string-append o (if (char=? #\' c) "&apos;" (->string c)))) "" s))

0 comments on commit 40e9122

Please sign in to comment.
Something went wrong with that request. Please try again.