mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add warning for BIDI characters in page renders and in diffs (#17562)
Fix #17514 Given the comments I've adjusted this somewhat. The numbers of characters detected are increased and include things like the use of U+300 to make à instead of à and non-breaking spaces. There is a button which can be used to escape the content to show it. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Gwyneth Morgan <gwymor@tilde.club> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -1005,6 +1005,16 @@ file_view_rendered = View Rendered
|
||||
file_view_raw = View Raw
|
||||
file_permalink = Permalink
|
||||
file_too_large = The file is too large to be shown.
|
||||
bidi_bad_header = `This file contains unexpected Bidirectional Unicode characters!`
|
||||
bidi_bad_description = `This file contains unexpected Bidirectional Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.`
|
||||
bidi_bad_description_escaped = `This file contains unexpected Bidirectional Unicode characters. Hidden unicode characters are escaped below. Use the Unescape button to show how they render.`
|
||||
unicode_header = `This file contains hidden Unicode characters!`
|
||||
unicode_description = `This file contains hidden Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.`
|
||||
unicode_description_escaped = `This file contains hidden Unicode characters. Hidden unicode characters are escaped below. Use the Unescape button to show how they render.`
|
||||
line_unicode = `This line has hidden unicode characters`
|
||||
|
||||
escape_control_characters = Escape
|
||||
unescape_control_characters = Unescape
|
||||
file_copy_permalink = Copy Permalink
|
||||
video_not_supported_in_browser = Your browser does not support the HTML5 'video' tag.
|
||||
audio_not_supported_in_browser = Your browser does not support the HTML5 'audio' tag.
|
||||
@@ -2101,6 +2111,7 @@ diff.protected = Protected
|
||||
diff.image.side_by_side = Side by Side
|
||||
diff.image.swipe = Swipe
|
||||
diff.image.overlay = Overlay
|
||||
diff.has_escaped = This line has hidden Unicode characters
|
||||
|
||||
releases.desc = Track project versions and downloads.
|
||||
release.releases = Releases
|
||||
|
Reference in New Issue
Block a user