Function to correct clipped html content