Tracker: Disallow control characters in file name edit
Change-Id: I1e87768cc70fdd501ca0a4710df619dd2d59ce7a Reviewed-on: https://review.haiku-os.org/c/haiku/+/8170 Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: nephele nephele <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
d292bcc64b
commit
04bf57110c
@@ -178,6 +178,10 @@ ValidateStream(BMallocIO* stream, uint32 key, int32 version)
|
||||
void
|
||||
DisallowFilenameKeys(BTextView* textView)
|
||||
{
|
||||
// disallow control characters
|
||||
for (uint32 i = 0; i < 0x20; ++i)
|
||||
textView->DisallowChar(i);
|
||||
|
||||
textView->DisallowChar('/');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user