Let me quote from the Memory Alpha page on transporters, emphasis mine:
Disabling active weapons
By the 24th century, the transporter had the capability to disable any active weapon during transport. This could be accomplished by removing the discharged energy from the transporter signal, or by "deactivating" the weapon itself. The transporter system ...
This capability of the transporter was previously established in the TNG episode "The Most Toys". Data begins to fire a disruptor, but is caught in a transport beam as the weapon begins to fire:
O'BRIEN: I'm reading a weapon in transit with Commander Data. It seems to have discharged, sir.
O'BRIEN: I'm deactivating it.