fix missing grapheme in mime encoded string
parent
46a0574713
commit
8ab79d5829
|
@ -11,10 +11,6 @@ pub fn encode_header(value: &str) -> String {
|
||||||
(true, true) => {
|
(true, true) => {
|
||||||
ret.push_str(g);
|
ret.push_str(g);
|
||||||
}
|
}
|
||||||
(false, true) => {
|
|
||||||
current_window_start = idx;
|
|
||||||
is_current_window_ascii = false;
|
|
||||||
}
|
|
||||||
(true, false) => {
|
(true, false) => {
|
||||||
/* If !g.is_whitespace()
|
/* If !g.is_whitespace()
|
||||||
*
|
*
|
||||||
|
@ -31,8 +27,14 @@ pub fn encode_header(value: &str) -> String {
|
||||||
ret.push(' ');
|
ret.push(' ');
|
||||||
}
|
}
|
||||||
is_current_window_ascii = true;
|
is_current_window_ascii = true;
|
||||||
|
current_window_start = idx;
|
||||||
|
ret.push_str(g);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
(false, true) => {
|
||||||
|
current_window_start = idx;
|
||||||
|
is_current_window_ascii = false;
|
||||||
|
}
|
||||||
/* RFC2047 recommends:
|
/* RFC2047 recommends:
|
||||||
* 'While there is no limit to the length of a multiple-line header field, each line of
|
* 'While there is no limit to the length of a multiple-line header field, each line of
|
||||||
* a header field that contains one or more 'encoded-word's is limited to 76
|
* a header field that contains one or more 'encoded-word's is limited to 76
|
||||||
|
|
Loading…
Reference in New Issue