taxonomy_autocomplete() uses filter_xss() on the display string, while user_autocomplete() and profile_admin_settings_autocomplete() use check_plain().
Taxonomy terms are plain-text strings that don't allow rich-text formatting, so they should also be passed through check_plain(). Otherwise strange things occur if you have terms containing special characters. The attached image shows the taxonomy term list (1.), and the taxonomy selector on the node edit page during (2.) and after (3.) auto-completion. Note that the suggested items in 2. don't reflect the actual term names.
Comment | File | Size | Author |
---|---|---|---|
screenshot-autocomplete.png | 34.87 KB | c960657 | |
taxonomy-autocomplete-1.patch | 955 bytes | c960657 | |
Comments
Comment #1
c960657 CreditAttribution: c960657 commentedComment #2
yched CreditAttribution: yched commentedSounds good to me - does it still apply ?
Comment #3
c960657 CreditAttribution: c960657 commentedYes (with a 1 line offset).
Comment #4
yched CreditAttribution: yched commentedLooks good then.
Comment #5
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!