Chinese authorities detained a blogger for five days for “being disrespectful to the national anthem”, police in the city of Shanghai said.