aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-03 17:18:06 +0800
committerGitHub <noreply@github.com>2023-08-03 09:18:06 +0000
commit539015403f80326d662e31cf9d3a459b3efefcd7 (patch)
tree8738c457c8f245aeae2201157d2a5f44fafe6125 /web_src/js
parentcad22512b8948fa52e1684ec30bb5a6e5d427d5f (diff)
downloadgitea-539015403f80326d662e31cf9d3a459b3efefcd7.tar.gz
gitea-539015403f80326d662e31cf9d3a459b3efefcd7.zip
Fix the topic validation rule and suport dots (#26286)
1. Allow leading and trailing spaces by user input, these spaces have already been trimmed at backend 2. Allow using dots in the topic
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/features/repo-home.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/repo-home.js b/web_src/js/features/repo-home.js
index 55a2771054..70c225b4ba 100644
--- a/web_src/js/features/repo-home.js
+++ b/web_src/js/features/repo-home.js
@@ -166,7 +166,7 @@ export function initRepoTopicBar() {
rules: [
{
type: 'validateTopic',
- value: /^[a-z0-9][a-z0-9-]{0,35}$/,
+ value: /^\s*[a-z0-9][-.a-z0-9]{0,35}\s*$/,
prompt: topicPrompts.formatPrompt
},
{