You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/08/03 21:59:05 UTC

[jira] [Commented] (COUCHDB-2717) Back button does nothing when editing documents with \" in the id

    [ https://issues.apache.org/jira/browse/COUCHDB-2717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652382#comment-14652382 ] 

ASF GitHub Bot commented on COUCHDB-2717:
-----------------------------------------

GitHub user michellephung opened a pull request:

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

    Take out one layer of encoding

    There is some encoding issues going on.  :/
    
    This is related to [original reason for the change: COUCHDB-2717] (https://issues.apache.org/jira/browse/COUCHDB-2717), and possibly related to [DBCore Issue:COUCHDB-2748 ](https://issues.apache.org/jira/browse/COUCHDB-2748)
    
    We're double encoding the url, in app/addons/documents/base.js, (file edited in this PR).
    
    I am able to save a document with the name:
    ![screen shot 2015-08-03 at 3 33 04 pm](https://cloud.githubusercontent.com/assets/836039/9045938/59ffdd8a-39f5-11e5-8edb-bdd7cb8d2d85.png)
    but when I click on it: i am rerouted back to all docs, because: 
    GET http://localhost:8000/aaa/__hello-world%253A%2520colonspace__ 404 (Not Found)
    
    So it SHOULD go to:
    
    GET http://localhost:8000/aaa/__hello-world%3A%20colonspace__
    
    (notice the extra '25' before the %3A=(colon) and %20=(space), and that %25=(percent sign))
    
    Research
    - A bit of explaining as to what that `%2520` is :
    
    - The common space character is encoded as` %20` as you noted yourself. The` %` character is encoded as `%25`.
    
    - The way you get `%2520` is when your url already has a`%20` in it, and gets urlencoded again, which transforms the `%20` to `%2520`.
    
    [Source: SO](http://stackoverflow.com/questions/16084935/a-html-space-is-showing-as-2520-instead-of-20)
    
    I'm not sure about the < back button behavior with when editing/looking at a view document, and if we still need to encode the url for that fix.
    
    @garrensmith could you take a look at this? for  [COUCHDB-2717] (https://issues.apache.org/jira/browse/COUCHDB-2717) I couldn't reproduce, and i remember you mentioned you fixed the < back button navigation after this fix, so we might not need to encode here. 
    
    
    


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

    $ git pull https://github.com/michellephung/couchdb-fauxton Encoding-issue

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

    https://github.com/apache/couchdb-fauxton/pull/489.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 #489
    
----
commit 2616f9c63cea200d665e282970ebafae34786f14
Author: Michelle Phung <mi...@apache.org>
Date:   2015-08-03T19:31:17Z

    Take out one layer of encoding

----


> Back button does nothing when editing documents with \" in the id
> -----------------------------------------------------------------
>
>                 Key: COUCHDB-2717
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2717
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Garren Smith
>
> After saving the document for the first time, The back "<" button did nothing.
> Building on that bug:
> - Double click on a document with \" in the id and pull up the doc editor
> - Note that the "<" button doesn't work
> - Click the pencil icon on the document with \" in the id and pull up the doc editor
> - Note that the "<" button *does* work



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)