| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM % comment
AppendCharacter(static_cast<char>(c));What about unicode characters? Why did you remove that?
We seem to escape non-printable ascii (latin1?) characters in LogFile::MessageBuilder::AppendCharacter, but not unicode.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
What about unicode characters? Why did you remove that?
We seem to escape non-printable ascii (latin1?) characters in LogFile::MessageBuilder::AppendCharacter, but not unicode.
ah true, good call.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/logging/log-file.cc
Insertions: 6, Deletions: 1.
@@ -119,7 +119,12 @@
if (length_limit) length = std::min(length, *length_limit);
for (int i = 0; i < length; i++) {
uint16_t c = str->Get(i, access_guard);
- AppendCharacter(static_cast<char>(c));
+ if (c <= 0xFF) {
+ AppendCharacter(static_cast<char>(c));
+ } else {
+ // Escape non-ascii characters.
+ AppendRawFormatString("\\u%04x", c & 0xFFFF);
+ }
}
}
```
[logging] Remove redundant DCHECK in MessageBuilder
No need to check for the null-terminator since we already properly
escape it in LogFile::MessageBuilder::AppendCharacter.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |