Automatically add https if no protocol specified for longurl

This commit is contained in:
SinTan1729
2022-11-11 18:52:22 -06:00
parent 99073bfd6c
commit 2c8076e2e1
2 changed files with 21 additions and 5 deletions

View File

@@ -67,9 +67,10 @@
Shorten</legend>
<div class="pure-control-group">
<label for="longUrl">Long URL</label>
<input type="url" name="longUrl" id="longUrl" placeholder="Please enter a valid URL" required />
<input type="url" name="longUrl" id="longUrl" placeholder="Please enter a valid URL"
onblur="addProtocol(this)" required />
</div>
<div class="pure-control-group">
<div class=" pure-control-group">
<label for="shortUrl">Short URL (optional)</label>
<input type="text" name="shortUrl" id="shortUrl" placeholder="Only a-z, 0-9, - and _ are allowed"
pattern="[A-Za-z0-9_-]+" />