Jakarta says it is preparing legislation to protect minors from 'physical, mental, or moral perils'.