hi Vlad,
In solution #1, If the 'signal' voltage was always higher than the +5V output from the 7805, the correct method would be to use a resistive voltage divider [ across the lower diode] so that the voltage to the IC would be +5V or less.
For inductive suppresion, the series resistor would not be present.
If you have a circuit where the output voltage of the 7805 can be 'forced' higher than +5V output, one method used to protect the 7805 is to connect a 1N4001 diode across the 7805. This will ensure that the 'reverse' voltage across the 7805 will not exceed approx 0.7V [diode anode to the 7805 output, cathode to input]