The former pro-democracy newspaper publisher was sentenced for offences under the controversial national security law.