| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Follow #29165
|
|
|
| |
HTML is not XML.
|
|
|
|
|
|
|
|
| |
* Make sure fmt catches all templates
Make's `wildcard` is not recursive so it missed many template files, fix
that by using `find`.
* Update Makefile
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactor `i18n` to `locale`
- Currently we're using the `i18n` variable naming for the `locale`
struct. This contains locale's specific information and cannot be used
for general i18n purpose, therefore refactoring it to `locale` makes
more sense.
- Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200
* Update routers/install/install.go
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately many email readers will (helpfully) detect url or url-like names and
automatically create links to them, even in HTML emails. This is not ideal when
usernames can have dots in them.
This PR tries to prevent this behaviour by sticking ZWJ characters between dots and
also set the meta tag to prevent format detection.
Not every email template has been changed in this way - just the activation emails but
it may be that we should be setting the above meta tag in all of our emails too.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Removed unused variable passed to mail.link_not_working_do_paste
Co-authored-by: 6543 <6543@obermui.de>
|
|
|
| |
close #14822
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* allow current user to reset their own password
* handle reset password edge cases properly and consistently
* remove dangling assignment
* properly label account recovery instead of reset password
* remove 'Click here' from button
* update English-only account-recovery templates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make distinction between DisplayName and Username in email templates
Store the actual username in the variable named Username and store the
separate DisplayName in another variable. This allows us to access the
actual username when we need, which currently fails if a user has set a
full name.
Fixes #6161
* Use u.Name directly
No need for extra function, also change use in all mail sending
functions here
* Don't include Username when not used
|
| |
|
| |
|
|
|
|
|
|
| |
* xxx_active_code_live setting in printed in hours and minutes instead of just hours
* Update app.ini description of xxx_code_lives settings
|
| |
|
|
|
|
|
|
| |
* Added rel="noopener" to target="_blank" hrefs
* Replaced gogs.io/docs with docs.gitea.io
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit improves templates readability, since all of them use consistent
indent with all template command blocks indented too.
1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks
such as {{if}} {{with}}
2. Cleans all trailing white-space
3. Adds trailing last line-break to each file
|
| |
|
| |
|
|
|
|
| |
American English.
|
|
|