Inevitably, tourist "safety" becomes part of a perception thing, and SF is not immune to perceptions by tourists (and even Bay Area natives like yours truly). In fact, the worst "safety issues" the average tourist will encounter are aggressive panhandlers and pickpockets, which are more annoyances that strict "safety."
With that said, I'd say you actually can't go wrong with any of the hotels east of, say, Leavenworth near Union Square, or around Moscone Center (which includes the 6-12 blocks referenced above).
Now for CY Van Ness and the Proper, take extra care with the surroundings especially at night.