Like the guys said, a stiff pullup and a cap. I would also add an inductor to keep the noise spikes out.
You can probably get by without L2 in this diagram but added it in just in case.

Name:  Filtered input.JPG
Views: 122251
Size:  60.8 KB