Add safe filter in djid template