GitHub user benkeen opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/538

    Fix for error caused by newlines in View search -> keys field

    Curious, very specific bug. When doing a search on a View and entering
    a value for the Keys field that contains a newline between two values,
    the encoding of the URL gets all messed up and you see a
    "missing_named_view" error get thrown within the UI. This ticket simply
    strips out newlines in that field.
    
    How to reproduce:
    - create a new view
    - click on the "Query Options" section and click on Keys to expand
    that section. Enter:
    
    ["one",
    "two"]
    
    Note the newline after the "one" line.
    - submit the form.
    
    Result: JS errors and the error notification.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/benkeen/couchdb-fauxton 
view-search-newline-issue

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/538.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #538
    
----
commit e95f901bfe70f62863c0ce137539edf2b74bb96f
Author: Ben Keen <[email protected]>
Date:   2015-09-28T18:32:29Z

    Fix for error caused by newlines in View search -> keys field
    
    Curious, very specific bug. When doing a search on a View and entering
    a value for the Keys field that contains a newline between two values,
    the encoding of the URL gets all messed up and you see a
    "missing_named_view" error get thrown within the UI. This ticket simply
    strips out newlines in that field.
    
    How to reproduce:
    - create a new view
    - click on the "Query Options" section and click on Keys to expand
    that section. Enter:
    
    ["one",
    "two"]
    
    Note the newline after the "one" line.
    - submit the form.
    
    Result: JS errors and the error notification.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to