Curtis Spencer
2005-Sep-30 18:01 UTC
[Rails-spinoffs] Ampersand in Auto Complete Entry Broken
Hi, I have been playing around with the autocomplete field in Rails 0.13. I have noticed that if I have an ampersand in the value such as "A&E", if I click on the entry in the autocomplete list, I am left with just A in the text box. I have narrowed it down to: String.unescapeHtml() in prototype.js as what strips the & and what follows it from the value. It strips it regardless of whether I use & or & in the actual values that I use in the autocomplete list. It appears that when div.innerHTML is set to some value like ''A&E'' it doesn''t like it. Any ideas? -- Thanks, Curtis
Thomas Fuchs
2005-Oct-01 04:56 UTC
[Rails-spinoffs] Ampersand in Auto Complete Entry Broken
This is all HTML so you need to escape the amperstand with & Thomas Am 30.09.2005 um 23:26 schrieb Curtis Spencer:> Hi, > > I have been playing around with the autocomplete field in Rails > 0.13. I have > noticed that if I have an ampersand in the value such as "A&E", if > I click on > the entry in the autocomplete list, I am left with just A in the > text box. I > have narrowed it down to: > > String.unescapeHtml() in prototype.js as what strips the & and what > follows it > from the value. It strips it regardless of whether I use & or > & in the > actual values that I use in the autocomplete list. > > It appears that when div.innerHTML is set to some value like ''A&E'' > it doesn''t like it. > > Any ideas? > > -- > Thanks, > Curtis > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >