Hi, >PTS fails to find a package if there are leading blanks in the >package entry window (easy to do if if copying and pasting).
Patch attached. David
Index: index.html =================================================================== --- index.html (revisión: 2999) +++ index.html (copia de trabajo) @@ -50,17 +50,17 @@ interest for co-maintainers, advanced users, QA members, ...</p> <p> - <form method="get" action="index.html"> - Debian source package: <input type="text" name="src"> - <input type="submit" value="Go"> + <form method="get" action="index.html" onsubmit="trimInputs();"> + Debian source package: <input type="text" name="src" onblur="this.value=this.value.trim();" /> + <input type="submit" value="Go" /> </form> </p> <p> Subscribe to events for source packages: - <form method="get" action="/cgi-bin/pts.cgi"> - <input type="text" name="package" placeholder="source package" /> - <input type="text" name="email" size="10" placeholder="your email" /> + <form method="get" action="/cgi-bin/pts.cgi" onsubmit="trimInputs();" > + <input type="text" name="package" placeholder="source package" onblur="this.value=this.value.trim();" /> + <input type="text" name="email" placeholder="your email" onblur="this.value=this.value.trim();" /> <select name="what"> <option value="subscribe">Subscribe</option> <option value="unsubscribe">Unsubscribe</option> Index: pts.js =================================================================== --- pts.js (revisión: 2999) +++ pts.js (copia de trabajo) @@ -56,3 +56,12 @@ } } +function trimInputs() { + var inputs = document.getElementsByTagName("input"); + + for (var i=0; i < inputs.length; i++) { + if (inputs[i].getAttribute('type') == 'text') { + inputs[i].value = inputs[i].value.trim(); + } + } +}