enforce maxlength on paste (bug 1029821)