id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 4074 admin interface filter.html does not encode url attributes properly tony.perkins@… nobody "If you filter on a field that has a value that includes an ampersand when selecting that value to filter on it does not work. The output of filter.html for an example {{{
  • Escapade - Adult Kayak & Snorkel, Northwest Maui
  • }}} I tried using the urlencode filter, but it encodes the ? as well which causes it to fail also. {{ choice.display|escape }} '''If I change the following it works. ''I know this is not the right place.''''' In filter.html change {{ choice.display|escape }} to {{ choice.display|escape }} in html.py change {{{ def fix_ampersands(value): ""Returns the given HTML with all unencoded ampersands encoded correctly"" return unencoded_ampersands_re.sub('&', value) }}} to {{{ def fix_ampersands(value): ""Returns the given HTML with all unencoded ampersands encoded correctly"" return unencoded_ampersands_re.sub('%26', value) }}} " closed contrib.admin newforms-admin fixed ampersand filter robert@… Ready for checkin 1 0 0 0 0 0