aboutsummaryrefslogtreecommitdiffstats
path: root/templates/mail/release.tmpl
Commit message (Collapse)AuthorAgeFilesLines
* Refactor some Str2html code (#29397)wxiaoguang2024-03-011-1/+1
| | | | | | | | | | | | | | | This PR touches the most interesting part of the "template refactoring". 1. Unclear variable type. Especially for "web/feed/convert.go": sometimes it uses text, sometimes it uses HTML. 2. Assign text content to "RenderedContent" field, for example: ` project.RenderedContent = project.Description` in web/org/projects.go 3. Assign rendered content to text field, for example: `r.Note = rendered content` in web/repo/release.go 4. (possible) Incorrectly calling `{{Str2html .PackageDescriptor.Metadata.ReleaseNotes}}` in package/content/nuget.tmpl, I guess the name Str2html misleads developers to use it to "render string to html", but it only sanitizes. if ReleaseNotes really contains HTML, then this is not a problem.
* Refactor Safe modifier (#29392)wxiaoguang2024-02-251-3/+3
| | | | After this PR: no need to play with the Safe/Escape tricks anymore. See the changes for more details.
* Refactor locale&string&template related code (#29165)wxiaoguang2024-02-141-1/+1
| | | | | | Clarify when "string" should be used (and be escaped), and when "template.HTML" should be used (no need to escape) And help PRs like #29059 , to render the error messages correctly.
* Remove incorrect HTML self close tag (#23748)wxiaoguang2023-03-271-1/+1
| | | HTML is not XML.
* Revert relative links to absolute links in mail templates (#23267)wxiaoguang2023-03-031-2/+2
| | | | | Follow #21986 , fix regression. The mail templates should always use `AppURL` (the full absolute URL)
* Use link in UI which returned a relative url but not html_url which contains ↵Lunny Xiao2023-02-061-2/+2
| | | | | | | | | | | | | | | an absolute url (#21986) partially fix #19345 This PR add some `Link` methods for different objects. The `Link` methods are not different from `HTMLURL`, they are lack of the absolute URL. And most of UI `HTMLURL` have been replaced to `Link` so that users can visit them from a different domain or IP. This PR also introduces a new javascript configuration `window.config.reqAppUrl` which is different from `appUrl` which is still an absolute url but the domain has been replaced to the current requested domain.
* Add whitespace removal inside template curly brackes (#20853)silverwind2022-08-251-1/+1
|
* Add disable download source configuration (#20548)Lunny Xiao2022-07-311-0/+2
| | | | | Add configuration to enable/disable download source from UI. Co-authored-by: zeripath <art27@cantab.net>
* Refactor `i18n` to `locale` (#20153)Gusted2022-06-271-7/+7
| | | | | | | | | | | * 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
* Multiple Escaping Improvements (#17551)zeripath2021-11-161-6/+4
| | | | | | | | | | | | | | 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>
* Localize Email Templates (#16200)65432021-06-231-8/+11
| | | close #14822
* Enforce tab indentation in templates (#15289)silverwind2021-04-101-1/+1
| | | | | | | | | | | | | | | | | | * Enforce tab indendation in templates This adds editorconfig-checker [1] to lint the template files so they conform the editorconfig files. I fixed all current identation issues using the fix mode of eclint [2] and some manual corrections. We can extend this linting to other files later, for now I'd like this PR to focus on HTML template files only. [1] https://github.com/editorconfig-checker/editorconfig-checker [2] https://github.com/jedmao/eclint * fix indendation Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* fix release mail html template (#14975)Norwin2021-03-121-2/+4
| | | | | was missing an </a>
* Add email notify for new release (#12463)赵智超2020-08-231-0/+56
* Add email notify for new release Signed-off-by: a1012112796 <1012112796@qq.com>