Get the Last Modified date of an URL recently had an edit that strip all the code from the question. I'm pretty sure this is not a thing to do since now the question make no sense at all. What is the good action to take ? Should I rollback the edit?
Rolling back a single 'bad' edit like this is appropriate.
If you notice the user rolling back to the 'bad' edit, or if you see a number of such edits, the best thing to do is to flag for moderator attention using "other" and explain the situation. It's best not to get into an editing war.
If you don't have enough reputation to do a non-reviewed edit, you won't see a Rollback option in the editing history. In that case, you can simply flag for a moderator. It's usually not practical to try to do a manual edit in such a case.
(You were not engaged in such an 'editing war', but I wanted to add that for future readers)