It's true an inductor will filter the harmonics of a waveform but, as RvM noted, a transformer does not act like an inductor to the signal passing through.
It only acts like an inductor to the primary magnetizing current, not the signal current from primary to secondary.
It's a common error to think that the transformer magnetizing inductance affects the signal passing through, but it doesn't. The signal sees no inductance (except for any stray and undesired leakage inductance).
Thus an ideal transformer is transparent to the signal.
That is why I mentioned "electromagnetically shielded". The additional transformer question was just to see if this applies to unshielded transformers as well.
I am asking for two identical electromagnets electrostatically shielded from each other, so no other component can pass from the first to the second apart from the magnetic field.
Will this configuration act like a short of BPF?
I am thinking it that way:
The two electromagnets are electrostatically shielded from each other with a non-ferrous material (eg aluminium) so that only the magnetic field can pass through.
The first electromagnet coil accepts mains 50Hz plus the mains harmonics.
All these components combine together to create the alternating magnetic field in the first electromagnet.
The second electromagnet (ideally closely spaced to the first) sees this alternating magnetic field and generates an AC to it's windings.
This AC is purified from harmonics, although there are losses in the process.
My point is, if the frequency of the harmonics in the first electromagnet will affect the frequency of it's alternating magnetic field, or if the higher frequency (but lower power) magnetic fields generated by the harmonics, will be dominated by the magnetic field produced by the fundamental frequency (net magnetic field).