Skip to content

Commit

Permalink
MDL-16108 force autocomplete off for unmaskable password fields
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Aug 18, 2008
1 parent 8c4f5bc commit 1f56978
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/form/passwordreveal.php
Expand Up @@ -23,6 +23,7 @@ function toHtml() {
$revealjs = '<script type="text/javascript">
//<![CDATA[
document.write(\'<div class="reveal"><input id="'.$id.'reveal" value="1" type="checkbox" onclick="revealPassword(\\\''.$id.'\\\')"/><label for="'.$id.'reveal">'.addslashes_js($reveal).'<\/label><\/div>\');
document.getElementById("'.$this->getAttribute('id').'").setAttribute("autocomplete", "off");
//]]>
</script>';
return $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />'.$revealjs;
Expand Down

0 comments on commit 1f56978

Please sign in to comment.