Means for protecting the electrolyte or the electrodes