Hi.
I ate my hair until 3rd grade. I don't remember my parents doing anything about it, but I bit from underneath where it wouldn't show, and I mostly did it at school. I remember having a mouthful and it just being unpleasant one day, so I spit it out and never did it again. You may want to ask your pediatrician because I think it is caused by a nutritional deficiency (iron or calcium, I don't remember which).
My youngest has bitten her nails since before she made a year. This was not a learned behavior since she doesn't see anyone do it. Our ped did blood work (not fun). Her levels were normal, so he said it was probably just boredom. She only does it in the car when she's strapped in the car seat and when she is going to sleep.
Rather than threatening, I'd actually get the hair cut into a bob and also start a good multi vitamin. From what I understand, it takes three weeks of consistent behavior to stop an old or make a new habit. By the time it grows out, she will probably have forgotten about it -unless of course she's being compelled by a nutritional need.
Good luck,
~K.
P.S. - the yukky tasting hair spray sounds like a good idea!