quick fix for too long user names

This commit is contained in:
dennisdebel 2015-05-22 17:56:48 +02:00
parent 253990eaae
commit d974b08694

View File

@ -77,7 +77,7 @@ function onSubmitMessage(){
return false;
}
var namm = document.getElementById('name').value;
if ( !namm || namm === "" ) {
if ( !namm || namm === "" || namm.length > 20) { /* prevent too long usernames */
namm = "anonymous";
}
addOutboxItem( namm, "<p class='text-message'>"+msg+"</p>" );