diff --git a/quad/value.go b/quad/value.go
index <HASH>..<HASH> 100644
--- a/quad/value.go
+++ b/quad/value.go
@@ -4,6 +4,7 @@ import (
 	"crypto/sha1"
 	"hash"
 	"strconv"
+	"strings"
 	"sync"
 	"time"
 )
@@ -63,9 +64,17 @@ func (s Raw) String() string { return string(s) }
 // String is an RDF string value (ex: "name").
 type String string
 
+var escaper = strings.NewReplacer(
+	"\\", "\\\\",
+	"\"", "\\\"",
+	"\n", "\\n",
+	"\r", "\\r",
+	"\t", "\\t",
+)
+
 func (s String) String() string {
 	//TODO(barakmich): Proper escaping.
-	return `"` + string(s) + `"`
+	return `"` + escaper.Replace(string(s)) + `"`
 }
 
 // TypedString is an RDF value with type (ex: "name"^^<type>).
quad: at least try to escape string values