mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 06:07:59 +00:00
Meta: Disallow emoji images with invalid code points in their file name
This commit is contained in:
committed by
Linus Groh
parent
23afb59a3d
commit
006118599c
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user