The proposed legislation was sharply criticized by many as an act of censorship that could start a dangerous precedent.