diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-03 17:18:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 09:18:06 +0000 |
commit | 539015403f80326d662e31cf9d3a459b3efefcd7 (patch) | |
tree | 8738c457c8f245aeae2201157d2a5f44fafe6125 /web_src/js | |
parent | cad22512b8948fa52e1684ec30bb5a6e5d427d5f (diff) | |
download | gitea-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.js | 2 |
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 }, { |