Added missing autocomplete="off", fixes #817
Added missing trim() for tags, fixes #817