import safely_encode