They are technically illegal, but as they are universally used, don't make life hard for yourself by pointing this out to anyone. If you want to check that they are suitably compressible so as not to hurt anyone, I suggest you ask to evaluate their composition before they are applied to the player in question. Ask yourself: if this player was of a different gender to me, would I really go feeling around their legs? If the answer is yes - you may like to revisit the safeguarding section of the referee's manual. If the answer is no, don't do if for the same gender either.