summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vobject/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vobject/lib.rs b/src/vobject/lib.rs
index cdbfebb..d5392e1 100644
--- a/src/vobject/lib.rs
+++ b/src/vobject/lib.rs
@@ -188,14 +188,19 @@ quoted_content -> &'input str
iana_token = ([a-zA-Z0-9] / "-")+
group_char = ([a-zA-Z0-9] / "-")
-safe_char = !";" !":" !"," value_char
-qsafe_char = !dquote value_char // FIXME
+qsafe_char = !dquote !ctl value_char
+safe_char = !";" !":" qsafe_char
value_char = !eol .
eol = "\r\n" / "\n" / "\r"
dquote = "\""
eols = eol+
+ctl = // "\x00-1F" / "\x7F"
+ "\x00" / "\x01" / "\x02" / "\x03" / "\x04" / "\x05" / "\x06" / "\x07" / "\x08" / "\t" / "\n" /
+ "\x0b" / "\x0c" / "\r" / "\x0e" / "\x0f" / "\x10" / "\x11" / "\x12" / "\x13" / "\x14" / "\x15"
+ / "\x16" / "\x17" / "\x18" / "\x19" / "\x1a" / "\x1b" / "\x1c" / "\x1d" / "\x1e" / "\x7f"
+
whitespace = " " / "\t"
__ = (eol / whitespace)*