Project

General

Profile

Actions

Bug #5634

open

Quick Search Toolbar bugs out if pull request contains unicode double quote character “

Added by Yechen Qiao almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
08.10.2020
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

Note that this is not the same as containing ASCII double quote, " which works fine.

“ only exists in Unicode.

We have a pull request created with this on the title of the pull requests. When the quick search result includes this character, the search fails with the following stacktrace.

/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36], RhodeCode 4.20.1
2020-10-08 10:20:41.218 [10123] ERROR [rhodecode.config.middleware] error occurred handling this request for path: /_goto_data
Traceback (most recent call last):
  File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/tweens.py", line 41, in excview_tween
    response = handler(request)
  File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/router.py", line 148, in handle_request
    registry, request, context, context_iface, view_name
  File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/view.py", line 667, in _call_view
    response = view_callable(context, request)
  File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/config/views.py", line 188, in attr_view
    return view(context, request)
  File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/config/views.py", line 214, in predicate_wrapper
    return view(context, request)
  File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
    result = view(context, request)
  File "/opt/rhodecode/store/da2il1f83gci4333j0sd256nji9nlhpa-python2.7-pyramid-1.10.4/lib/python2.7/site-packages/pyramid/viewderivers.py", line 132, in _class_view
    response = getattr(inst, attr)()
  File "/opt/rhodecode/store/g3hzna3wfnis7bxghysh533snc0majv8-python2.7-rhodecode-enterprise-ce-4.20.1/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 2507, in local_wrapper
    return wrapper(func, *args, **kwds)
  File "/opt/rhodecode/store/g3hzna3wfnis7bxghysh533snc0majv8-python2.7-rhodecode-enterprise-ce-4.20.1/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1823, in __wrapper
    return func(*fargs, **fkwargs)
  File "/opt/rhodecode/store/g3hzna3wfnis7bxghysh533snc0majv8-python2.7-rhodecode-enterprise-ce-4.20.1/lib/python2.7/site-packages/rhodecode/apps/home/views.py", line 684, in goto_switcher_                                                                                                                                data
    pull_requests, prefix_match = self._get_pull_request_list(query)
  File "/opt/rhodecode/store/g3hzna3wfnis7bxghysh533snc0majv8-python2.7-rhodecode-enterprise-ce-4.20.1/lib/python2.7/site-packages/rhodecode/apps/home/views.py", line 338, in _get_pull_requ                                                                                                                                est_list
    for obj in acl_iter], True
UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 24: ordinal not in range(128)

Actions

Also available in: Atom PDF