diff --git a/src/Makefile b/src/Makefile index 8a91379..9380a2f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -55,7 +55,7 @@ HACKERBASE-OBJS=hackerbase.o testing.o listing.o cal-month.o \ sgr-list.o sgr-block.o table-processor.o table-border.o \ table-style.o sgr-state.o util-utf8.o sgr-cell.o \ template-list-expander.o box-drawing.o util-list.o \ - export-web-static.o util-dir.o + export-web-static.o util-dir.o racket-kwargs.o .PHONY: imports imports: $(HACKERBASE-DEPS) diff --git a/src/export-web-static.scm b/src/export-web-static.scm index 7e79e97..829782a 100644 --- a/src/export-web-static.scm +++ b/src/export-web-static.scm @@ -44,6 +44,12 @@ util-git configuration) + ;; HTML entities + (define (sanitize-html str) + (string-translate* + str + '(("&" . "&") ("<" . "<") (">" . ">") ("\"" . """)))) + ;; Prints the HTML summary for given member to current-output-port (define (print-html-member mr) (print "") @@ -62,9 +68,8 @@ (print "
") - (print (string-translate* - (string-intersperse (brmember-source mr) "\n") - '(("&" . "&") ("<" . "<") (">" . ">") ("\"" . """)))) + (print (sanitize-html + (string-intersperse (brmember-source mr) "\n"))) (print "") (print "
") - (for-each print + (for-each (lambda (l) + (print (sanitize-html l))) ((git (*members-directory*) #:output) 'log '-p '-- (brmember-file-name mr))) diff --git a/src/racket-kwargs.scm b/src/racket-kwargs.scm index 59ac24e..36e3ef4 100644 --- a/src/racket-kwargs.scm +++ b/src/racket-kwargs.scm @@ -26,6 +26,8 @@ ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ;; +(declare (unit racket-kwargs)) + (module racket-kwargs (