emposha / FCBKcomplete

Jquery facebook like(fancy) multi-select
http://www.emposha.com
383 stars 115 forks source link

HTML in captions #14

Closed moopet closed 13 years ago

moopet commented 14 years ago

If you send down, for example, a list of usernames in elements with classes associated, or images or whatnot, the search function matches against the HTML. So [img src="mypic"] matches a search for "i" even if it's not in the user's name.

I fix this locally by modifying addMembers to use:

string += "" + (cache.length - 1) + ":" + val.caption.replace(/<[^>]+>/g, '') + ";";