You will most likekly have to replace the rubber seal that seals the window to the window frame. That could be found at your local dealer. Another option would be trying to patch it up with silicone or door seal all weather sealant to see if that works first.
Cut off any dangling bits. Get some black silicone sealant and apply it to the ripped piece. Cover smoothly with blue painter's masking tape to conform to original shape. Wait 48 hours with door left open for silicone to dry.
Now you know the carnappers' ways. That window seal is actually a weather strip that keeps away the water and dirt. It is better to buy a new weather strip that can be bought from car shops. Or, Salvage from a car graveyard neighborhood. Or, straighten the original and glue it with a silicone sealant.