No the diode will have a forward leakage current, therefore your pin will see the voltage on the other side. You should use a zenner or rail clamping diodes and a seriese resistor to protect your pin.
No the diode will have a forward leakage current, therefore your pin will see the voltage on the other side. You should use a zenner or rail clamping diodes and a seriese resistor to protect your pin.