Skip to content

Commit 1830e25

Browse files
committed
Validate hex colors when creating/editing labels
1 parent 3f7dbbd commit 1830e25

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="^#?[A-Fa-f0-9]+$" maxlength="7">
5454
{{template "repo/issue/label_precolors"}}
5555
</div>
5656
</div>

0 commit comments

Comments
 (0)