From bd1a3abe0434808b719c99d28180e4aa3593d29c Mon Sep 17 00:00:00 2001 From: Neha Kandpal Date: Jan 28 2018 13:54:23 +0000 Subject: UI modified so tags with slash or any special character cannot be created --- diff --git a/pagure/templates/settings.html b/pagure/templates/settings.html index 73f9010..38b6692 100644 --- a/pagure/templates/settings.html +++ b/pagure/templates/settings.html @@ -937,7 +937,7 @@
- @@ -1230,7 +1230,7 @@ $('#new_tag').click(function(e) { $('#tagcolor').append( '
\
\ - \
\
\ @@ -1245,6 +1245,16 @@ $('#new_tag').click(function(e) { ); }); +$('#update').click(function(e){ + var pattern='^[a-zA-Z0-9-_, .]+$'; + if(!document.getElementById("tag").value.match(pattern)) + { + alert("Proper syntax not followed."); + return false; + } +}); + + $('.extend-form').click(function(e) { const tgt = $(this).attr('data-target'); let form = $(tgt + ' > div:last-child').clone();