@@ -582,7 +582,7 @@ func (repo *Repository) DescriptionHTML() template.HTML {
582
582
sanitize := func (s string ) string {
583
583
return fmt .Sprintf (`<a href="%[1]s" target="_blank" rel="noopener">%[1]s</a>` , s )
584
584
}
585
- return template .HTML (descPattern .ReplaceAllStringFunc (markdown .Sanitizer . Sanitize (repo .Description ), sanitize ))
585
+ return template .HTML (descPattern .ReplaceAllStringFunc (markdown .Sanitize (repo .Description ), sanitize ))
586
586
}
587
587
588
588
// LocalCopyPath returns the local repository copy path
@@ -844,8 +844,8 @@ func cleanUpMigrateGitConfig(configPath string) error {
844
844
// createDelegateHooks creates all the hooks scripts for the repo
845
845
func createDelegateHooks (repoPath string ) (err error ) {
846
846
var (
847
- hookNames = []string {"pre-receive" , "update" , "post-receive" }
848
- hookTpl = fmt .Sprintf ("#!/usr/bin/env %s\n data=$(cat)\n exitcodes=\" \" \n hookname=$(basename $0)\n GIT_DIR=${GIT_DIR:-$(dirname $0)}\n \n for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do\n test -x \" ${hook}\" || continue\n echo \" ${data}\" | \" ${hook}\" \n exitcodes=\" ${exitcodes} $?\" \n done\n \n for i in ${exitcodes}; do\n [ ${i} -eq 0 ] || exit ${i}\n done\n " , setting .ScriptType )
847
+ hookNames = []string {"pre-receive" , "update" , "post-receive" }
848
+ hookTpl = fmt .Sprintf ("#!/usr/bin/env %s\n data=$(cat)\n exitcodes=\" \" \n hookname=$(basename $0)\n GIT_DIR=${GIT_DIR:-$(dirname $0)}\n \n for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do\n test -x \" ${hook}\" || continue\n echo \" ${data}\" | \" ${hook}\" \n exitcodes=\" ${exitcodes} $?\" \n done\n \n for i in ${exitcodes}; do\n [ ${i} -eq 0 ] || exit ${i}\n done\n " , setting .ScriptType )
849
849
giteaHookTpls = []string {
850
850
fmt .Sprintf ("#!/usr/bin/env %s\n \" %s\" hook --config='%s' pre-receive\n " , setting .ScriptType , setting .AppPath , setting .CustomConf ),
851
851
fmt .Sprintf ("#!/usr/bin/env %s\n \" %s\" hook --config='%s' update $1 $2 $3\n " , setting .ScriptType , setting .AppPath , setting .CustomConf ),
0 commit comments