SAN FRANCISCO (AP) — San Francisco wants people who rent out their homes through Airbnb and other online platforms to follow some rules, and it wants the platforms to advertise only those rule-abiding listings — or face steep fines. [...] Airbnb is suing its hometown, arguing that it's not responsible for making sure hosts follow city rules and that San Francisco, the place that birthed some of the world's most innovative startups, is undermining a bedrock principle that allowed those companies to flourish in the first place. In its federal lawsuit filed in June, Airbnb states San Francisco's ordinance violates a federal law that has long shielded websites such as Facebook and YouTube from responsibility for information posted by users. Legal experts say Airbnb has a good shot at prevailing in court, but that government also has a legitimate interest in regulating health and safety, which includes housing in a city that's among the most expensive in the country. Eric Goldman, co-director of the High Tech Law Institute and law professor at Santa Clara University, said he's not surprised the issue is playing out in San Francisco, a city with a massive housing shortage and little room to expand. The company filed a lawsuit with the U.S.