You can even bring an alcohol based aftershave in the glass container as long as it's up to 100ml. When I was traveling in France I passed airport security without problems and I had aftershave in glass container and Monsavon shaving soap which is 125ml btw. I just take care to put these things in plastic zipper bag for easier check up. I suppose that many things are thrown away just because they are not properly packed and security stuff simply don't want to bother.