use String().trim()

This commit is contained in:
Roland Gruber 2019-02-01 19:35:31 +01:00
parent ec19de29c0
commit 77e7c77e20
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/** /**
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2018 Roland Gruber Copyright (C) 2003 - 2019 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -783,7 +783,7 @@ window.lam.form = window.lam.form || {};
window.lam.form.autoTrim = function() { window.lam.form.autoTrim = function() {
jQuery('form').submit(function(e) { jQuery('form').submit(function(e) {
jQuery('.lam-autotrim').each(function() { jQuery('.lam-autotrim').each(function() {
this.value = String.trim(this.value); this.value = String(this.value).trim();
}); });
}); });
}; };