diff.rs
diff.rs copied to clipboard
Properly escape and display control characters
As explained in this article: Jia Tanning Go Code, it is possible to put weird characters in file and directory names. That's not a good thing.
Some things we can do to defend against it:
- Properly escape file names. If there are control characters, make them visually apparent. Some consideration should also be taken of how to deal with aliasing, in Unicode there are situations where the same character can have multiple encodings.
- Properly display control characters in file contents.
If we implement both of these, I think it should be useful.