Skip to content

Commit b1cc4bf

Browse files
wxiaoguangkemzeb
andauthored
Validate hex colors when creating/editing labels (go-gitea#34623) (go-gitea#34630)
Backport go-gitea#34623 --------- Co-authored-by: Kemal Zebari <[email protected]>
1 parent d35161c commit b1cc4bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/issue/labels/label_edit_modal.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<div class="field">
5151
<label for="color">{{ctx.Locale.Tr "repo.issues.label_color"}}</label>
5252
<div class="column js-color-picker-input">
53-
<input name="color" value="#70c24a" placeholder="#c320f6" required maxlength="7">
53+
<input name="color" value="#70c24a" placeholder="#c320f6" required pattern="^#?([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$" maxlength="7">
5454
{{template "repo/issue/label_precolors"}}
5555
</div>
5656
</div>

0 commit comments

Comments
 (0)