From 2e3f4c1a4e2ae72b364f9ca37ee0976ad5809d9c Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Fri, 6 Jan 2012 15:43:19 +0000 Subject: Better comment. --- src/rabbit_ssl.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rabbit_ssl.erl b/src/rabbit_ssl.erl index d9c8ac00..ff87d989 100644 --- a/src/rabbit_ssl.erl +++ b/src/rabbit_ssl.erl @@ -151,8 +151,10 @@ escape_rdn_value([C | S], middle) when C =:= $"; C =:= $+; C =:= $,; C =:= $;; C =:= $<; C =:= $>; C =:= $\\ -> [$\\, C | escape_rdn_value(S, middle)]; escape_rdn_value([C | S], middle) when C < 32 ; C >= 126 -> - %% only U+0000 needs escaping, but for display purposes it's handy - %% to escape all non-printable chars + %% Of ASCII characters only U+0000 needs escaping, but for display + %% purposes it's handy to escape all non-printable chars. All non-ASCII + %% characters get converted to UTF-8 sequences and then escaped. We've + %% already got a UTF-8 sequence here, so just escape it. lists:flatten(io_lib:format("\\~2.16.0B", [C])) ++ escape_rdn_value(S, middle); escape_rdn_value([C | S], middle) -> -- cgit v1.2.1