gitea/templates/repo
zeripath bbffcc3aec
Multiple Escaping Improvements (#17551)
There are multiple places where Gitea does not properly escape URLs that it is building and there are multiple places where it builds urls when there is already a simpler function available to use this.
    
This is an extensive PR attempting to fix these issues.

1. The first commit in this PR looks through all href, src and links in the Gitea codebase and has attempted to catch all the places where there is potentially incomplete escaping.
2. Whilst doing this we will prefer to use functions that create URLs over recreating them by hand.
3. All uses of strings should be directly escaped - even if they are not currently expected to contain escaping characters. The main benefit to doing this will be that we can consider relaxing the constraints on user names and reponames in future. 
4. The next commit looks at escaping in the wiki and re-considers the urls that are used there. Using the improved escaping here wiki files containing '/'. (This implementation will currently still place all of the wiki files the root directory of the repo but this would not be difficult to change.)
5. The title generation in feeds is now properly escaped.
6. EscapePound is no longer needed - urls should be PathEscaped / QueryEscaped as necessary but then re-escaped with Escape when creating html with locales Signed-off-by: Andrew Thornton <art27@cantab.net>

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-11-16 18:18:25 +00:00
..
branch Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
diff Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
editor Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
graph Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
issue Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
migrate Migrating wiki don't require token, so we should move it out of the require form (#17645) 2021-11-16 14:17:21 +08:00
projects Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
pulls Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
release Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
settings Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
wiki Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
activity.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
blame.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
branch_dropdown.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
clone_buttons.tmpl Add copy button to markdown code blocks (#17638) 2021-11-16 16:16:05 +08:00
commit_page.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
commit_status.tmpl
commit_statuses.tmpl
commits.tmpl
commits_list.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
commits_list_small.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
commits_table.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
create.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
empty.tmpl
forks.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
graph.tmpl Re-separate the color translation strings (#17390) 2021-10-21 23:51:03 +02:00
header.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
home.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
icon.tmpl
search.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
shabox_badge.tmpl
sub_menu.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
upload.tmpl
user_cards.tmpl
view_file.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
view_list.tmpl Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
watchers.tmpl