smarter attribute value quote selection & escaping. fixes #72.