aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdump.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/dump.scm b/dump.scm
index eca54cd..835a199 100755
--- a/dump.scm
+++ b/dump.scm
@@ -135,6 +135,14 @@ association list mapping substrings to their replacements."
str
replacement-alist))
+(define (sanitize-rdf-string str)
+ (replace-substrings
+ (string-trim-both str)
+ '(("\r" . "\\r")
+ ("\n" . "\\n")
+ ("\"" . "'")
+ ("\v" . ""))))
+
(define (snake->lower-camel str)
(let ((char-list (string->list str)))
(call-with-output-string