google apps script - Password input field created with HTMLService loses type=password -
i'm creating password reset form use staff @ school using google apps education. i'm using htmlservice api import html file , use template. part of file table:
<table id=passwords> <tr> <td>new password</td> <td> <input name='password1' id='password1' type='password'/> </td> </tr> <tr> <td>confirm new password</td> <td> <input name='password2' id='password2' type='password'/> </td> </tr> </table>
when display gadget on google sites page, type='password'
lost html, passwords aren't hidden when user types them in:
<table id="passwords-caja-guest-0___"> <tbody><tr> <td>new password</td> <td> <input autocomplete="off" id="password1-caja-guest-0___" name="password1"> </td> </tr> <tr> <td>confirm new password</td> <td> <input autocomplete="off" id="password2-caja-guest-0___" name="password2"> </td> </tr> </tbody></table>
i can shift using uiservice instead, has password input widget hide password, other folks going maintain site after me have learn uiservice's rather lengthy api.
so, i'm looking ideas on how hide password input in context (i.e. show asterisks or bullets when user types in password).
congratulations! have filed first bug on new htmlservice :).
it seems type=password lost on sanitization step. it's filed bug 1487
as workaround, work fine today.
<input name='password1' id='password1' /> <script>document.getelementbyid('password1').type='password'</script>
that is, setting type in javascript working. temporary workaround though; fix underlying bug asap. report.
update: underlying bug has been fixed in caja , pick in next apps script release.
Comments
Post a Comment