A bomb exploded at a restaurant in the southern Philippines on Wednesday, wounding at least 18 people in a suspected revenge attack by a militant group, security officials said.