Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1382)

Issue 23760043: Make tilde in search field not crash.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by bac
Modified:
10 years, 6 months ago
Reviewers:
mp+194549, gary.poster
Visibility:
Public.

Description

Make tilde in search field not crash. Also, convert ~foo into owner: foo, assuming that's what is wanted. https://code.launchpad.net/~bac/charmworld/search-special-characters/+merge/194549 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
A charmworld/templates/search-terms-bad.pt View 1 chunk +9 lines, -0 lines 1 comment Download
M charmworld/views/search.py View 3 chunks +15 lines, -1 line 3 comments Download
M charmworld/views/tests/test_search.py View 2 chunks +46 lines, -0 lines 0 comments Download

Messages

Total messages: 3
bac
Please take a look.
10 years, 6 months ago (2013-11-08 18:55:12 UTC) #1
gary.poster
LGTM. If you need QA you might need to handhold me through a setup. https://codereview.appspot.com/23760043/diff/1/charmworld/views/search.py ...
10 years, 6 months ago (2013-11-08 19:04:21 UTC) #2
bac
10 years, 6 months ago (2013-11-08 19:12:03 UTC) #3
QA:

HOME=_run INI=charmworld.ini bin/enqueue --prefix=~charmers/charms/precise
HOME=_run INI=charmworld.ini bin/enqueue --prefix=~bac/charms/bundles
HOME=_run INI=charmworld.ini bin/ingest-queued

Then search for ~bac or someone else.

https://codereview.appspot.com/23760043/diff/1/charmworld/templates/search-te...
File charmworld/templates/search-terms-bad.pt (right):

https://codereview.appspot.com/23760043/diff/1/charmworld/templates/search-te...
charmworld/templates/search-terms-bad.pt:5: 
Could be friendlier.

https://codereview.appspot.com/23760043/diff/1/charmworld/views/search.py
File charmworld/views/search.py (right):

https://codereview.appspot.com/23760043/diff/1/charmworld/views/search.py#new...
charmworld/views/search.py:23: 
So there are other special characters for Lucene syntax.  I guess not handling
them is ok since we go to an error page.

https://codereview.appspot.com/23760043/diff/1/charmworld/views/search.py#new...
charmworld/views/search.py:44: return response
Just to track what "bad" search strings our users are using for future fixing? 
Sure, good idea.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b