Hair treatment agents combining improved care effects, in particular improved combability, softness and shine of the hair, with a viscosity stability over wide temperature ranges include—relative to their weight—0.1 to 20 wt. % of at least one UV filter and 0.1 to 30 wt. % of at least one compound of the general formula (I), in which n and m independently of one another denote integers between 5 and 40, with the proviso that n+m≧38 a and b independently of one another denote integers between 1 and 10 R and R′ are selected independently of one another from —H and —CH3 X− is a physiologically acceptable anion.