forgejo/templates/repo
silverwind 60e4a98ab0
Preserve BOM in web editor (#28935)
The `ToUTF8*` functions were stripping BOM, while BOM is actually valid
in UTF8, so the stripping must be optional depending on use case. This
does:

- Add a options struct to all `ToUTF8*` functions, that by default will
strip BOM to preserve existing behaviour
- Remove `ToUTF8` function, it was dead code
- Rename `ToUTF8WithErr` to `ToUTF8`
- Preserve BOM in Monaco Editor
- Remove a unnecessary newline in the textarea value. Browsers did
ignore it, it seems but it's better not to rely on this behaviour.

Fixes: https://github.com/go-gitea/gitea/issues/28743
Related: https://github.com/go-gitea/gitea/issues/6716 which seems to
have once introduced a mechanism that strips and re-adds the BOM, but
from what I can tell, this mechanism was removed at some point after
that PR.
2024-01-27 18:02:51 +00:00
..
actions
branch
cite
code
diff Don't show new pr button when page is not compare pull (#26431) 2024-01-21 15:13:00 +00:00
editor Preserve BOM in web editor (#28935) 2024-01-27 18:02:51 +00:00
find
graph
issue Don't reload timeline page when (un)resolving or replying conversation (#28654) 2024-01-24 03:26:28 +00:00
migrate
projects
pulls
release Fix hardcoded GitHub icon used as migrated release avatar (#28910) 2024-01-24 01:07:13 +00:00
settings Don't run push mirrors for archived repos (#27140) 2024-01-24 02:32:57 +00:00
tag
wiki
activity.tmpl Render code block in activity tab (#28816) 2024-01-16 22:38:09 +08:00
blame.tmpl
branch_dropdown.tmpl
clone_buttons.tmpl
clone_script.tmpl
commit_load_branches_and_tags.tmpl
commit_page.tmpl
commit_status.tmpl
commit_statuses.tmpl
commits.tmpl
commits_list.tmpl Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
commits_list_small.tmpl
commits_table.tmpl
create.tmpl Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
create_helper.tmpl
empty.tmpl
file_info.tmpl Show in Web UI if file is vendored and generated (#28620) 2024-01-24 13:51:37 +08:00
forks.tmpl
graph.tmpl
header.tmpl Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
home.tmpl
icon.tmpl
latest_commit.tmpl Show latest commit for file (#28067) 2024-01-15 17:42:15 +01:00
packages.tmpl
release_tag_header.tmpl
search.tmpl
search_name.tmpl
shabox_badge.tmpl
sub_menu.tmpl
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl
view_file.tmpl Show latest commit for file (#28067) 2024-01-15 17:42:15 +01:00
view_list.tmpl Show latest commit for file (#28067) 2024-01-15 17:42:15 +01:00
watchers.tmpl