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 included weapons deactivation subroutines to control the process. (TNG: "The Most Toys", "The Hunted", "Rascals")
The transporter was also capable of removing weapons entirely during transport, a setting referred to by Starfleet as "Transport Protocol Five". When the Defiant beamed aboard survivors from a damaged Jem'Hadar ship, the transporter was programmed to remove the crew's disruptors and other weapons. (DS9: "To the Death")
So, yes, TNG-era federation transporters have the capability to deactivate weapons. It seems that this capability has to be explicitly enabled (and that it works with Ferengi weapons as well); let me quote the plot of the TNG "Rascals" episode:
[...] they start using combadges to beam the Ferengi behind the force field on the transporter pad and the weapons deactivation program to disable their sidearms.
The relevant bit of the script for that episode is...
83 INT. SCHOOL ROOM (OPTICAL)
[...]
YOUNG PICARD
[...]
The weapon deactivation program
is in place... Transporter
security field standing by...
We're ready.
[...]
84AB FERENGI #1 (OPTICAL)
Looks down at the toy in surprise... then he suddenly
DEMATERIALIZES.
A beat and then he REMATERIALIZES on the Transporter
stage. Ferengi #1 is dazed for a moment... then tries
to leave the stage, but walks INTO A FORCEFIELD. He is
shocked and pulls his weapon, but it doesn't work.
...and you can see the LCARS interface they used in that episode to enable the "weapons deactivation subroutine" in this screenshot:

And as for "protocol five", let me quote the script of the DS9 episode "To The Death":
13 INT. DEFIANT - TRANSPORTER BAY
[...]
The lights brighten. Sisko turns to the Transporter Chief.
SISKO
Transporter protocol five.
Engage.
The chief complies and [...] six Jem'Hadar, led by
FIRST OMET'IKLAN, and a single Vorta (WEYOUN) MATERIALIZE
on the transporter pad. The Jem'Hadars' hands are empty but
positioned as if they were carrying guns. (In fact we may see
little sparklies linger where the guns were for a beat, then
dissipate.) Weyoun is carrying a locked metal case.
[...]
SISKO
If you're looking for your
weapons, they were removed in
transport.
Why does transporter protocol five remove the weapons entirely when the deactivation subroutine would have been enough? I have no idea. Do these affect melee weapons (e.g. blades) as well? I also have no idea. In any case, the federation transporters in the TNG era have the capability to detect weapons and either deactivate or remove them.
Also note that the Enterprise-D was launched on year 2363 (stardate 40759.5), the USS Defiant was launched on year 2370 (stardate 47538.5) and the USS Voyager was launched on year 2371 (stardate 48038.5); we can safely assume that all the techonology available to the Enterprise-D and the Defiant was available to the Voyager, including the transporter safety protocols.