The government will introduce new legislation in parliament next year to replace a tough law allowing preventive detention as time is needed to work out the details.