Laws are not moral and right just because they are laws.
Laws that stop this kind of "expression" have existed in Germany a while now, for historical reasons.
From the article, "Attacks on refugees are often the result of radicalization, which begins on social networks."
You don't restrict rights based on how others respond to people exercising those rights.