Australia is considering data-privacy rules that could make it illegal for social-media companies to direct children to harmful content. The government on Monday released draft legislation related to an online-privacy code for tech companies. The legislation is expected to be introduced in Australia’s parliament early next year. If passed, the privacy regulator would oversee the development of the code with input from the tech industry.