#1224 Web search page doesn't like unicode results
Closed: Fixed by mikem. Opened by mikem.

If a search result (e.g. a package name) contains a unicode character, then the web ui errors if it appears in the results:

 KeyError: u'\xb8'
Traceback (most recent call last):
  File "/usr/share/koji-web/scripts/wsgi_publisher.py", line 392, in handle_request
    result = func(environ, **data)
  File "/usr/share/koji-web/scripts/index.py", line 2289, in search
    return _genHTML(environ, 'searchresults.chtml')
  File "/usr/share/koji-web/lib/kojiweb/util.py", line 147, in _genHTML
    return tmpl_inst.respond().encode('utf-8', 'replace')
  File "searchresults_chtml.py", line 197, in respond
  File "/usr/lib64/python2.7/urllib.py", line 1298, in quote
    return ''.join(map(quoter, s))
KeyError: u'\xb8'

It appears that the searchresults template is url quoting the name field of the result in case the infoURL format string uses it. However, it doesn't look like we ever actually use the name field for any of those, so this might be an easy fix.


PR #1281

Commit 797b2612 fixes this issue

Commit a2892a9b fixes this issue

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.18

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/1224

Please continue any further discussion there.

Metadata
Related Pull Requests