mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:14:58 +00:00
Meta: Disallow emoji images with invalid code points in their file name
This commit is contained in:
parent
23afb59a3d
commit
006118599c
1 changed files with 7 additions and 0 deletions
|
@ -52,6 +52,13 @@ def any_problems_here():
|
||||||
found_invalid_filenames = True
|
found_invalid_filenames = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
code_points = [int(code_point[len('U+'):], 16) for code_point in filename.split('_')]
|
||||||
|
|
||||||
|
if any(code_point > 0x10ffff for code_point in code_points):
|
||||||
|
print(f'Filename {filename}.png contains a code point exceeding U+10FFFF')
|
||||||
|
found_invalid_filenames = True
|
||||||
|
break
|
||||||
|
|
||||||
return found_invalid_filenames
|
return found_invalid_filenames
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue