There are several approaches, all with advantages and disadvantages. For the signal in your graphic, a Schmitt trigger with the upper threshold level set well above the peak on the noise (maybe 2/3 or 3/4 of the voltage at the top of the square wave) will produce a perfect square wave with a very small delay from the original edges. The lower threshold should be 1/4 or 1/3 of the peak voltage to prevent noise at the top of the square wave (not present in your graphic) from creating a false transition in the output.
I would be concerned to know what is causing the noise, and is it present all the time. Can you ascertain that the "noise" is the same every time this pulse occurs. If not, then many of the possible schemes to prevent it happening may fail, cheers, Richard