Part of the point of terrorist activities is to create publicity. Terrorists are attempting to achieve political or personal goals with acts that manipulate the fears and worries of ordinary people. They may gauge the success of their actions by the degree to which their acts are publicized. Thus, giving this sort of intense media coverage to terrorists is in a sense to be complicit with terrorism and to help terrorists achieve their goals and, even worse, to encourage future terrorists. After all, if a tactic succeeds, people will continue to use it.
Although state censorship of news media is wrong, in this case, it would have been far better for the media to have covered the story with simple factual reporting, buried in world news sections, rather than in blaring headlines. Also, leaking military plans before the fact may have breached the needed operational security, interfering with the hostages' rescue. While news media do need to hold the military accountable, they should delay treatment of specific operational details until after the fact.
That said, terrorism is often the result of desperation. People feel their voices and issues are ignored by the international community. Thus the media, by proactively reporting issues such as persecution of minority groups, can play a role in preventing terrorism.
Finally, one should note that in an era of big data, the media responds to the number of people who click on a story. Thus, the blame for giving terrorists the attention they seek lies less in the media than in a reading public who will only pay attention to celebrity gossip and acts of terrorism, rather than read world news as it unfolds and work to elect politicians who remain engaged with the world's problems and injustices. Treating hostages as celebrities rather than focusing on the actual issues behind the terrorist acts turns politics into a circus rather than a serious ethical arena.