Hi darrel,
I don't think that is it. Yes the 10k should go to ground but the internal protection diodes will clamp the 24V to 5.7 volts and the maximum current out the pin will be 19/57 mA or about 350 uA. I have seen a Microchip app note that puts mains voltage via a large resistor direct to a PIC port pin, not unlike what is being done here.

Cheers
Brian