Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing --filter="...." correctly escapes the spaces into "%20" and not "+" #595

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Feb 20, 2023

  1. passing --filter="...." correctly escapes the spaces into "%20" and n…

    …ot "+"
    
    Running teaspoon as
    
    bundle exec teaspoon -s default --filter="ScenePointers are attached"
    
    When using CGI.escape the string "ScenePointers are attached" becomes "ScenePointesr+are+attached"
    This is then passed as a "grep=ScenePointers+are+attached" into the url
    
    In the JS that is running the specs in the browser the value of the grep is used to filter.
    We move through all the specs and encode their full name with encodeURIComponent
    
    The result is
    
    encodeURIComponent("ScenePointers are added")
    'ScenePointers%20are%20added'
    
    This means that on the ruby side we were escaping the space " " in the urls as '+' and on the
    JS side we were escaping them as "%20". One of these had to change and it seems changing it on
    the ruby side is the right one.
    
    There is no right way to escape. We can use 'addressable' and URI and CGI and ERB.
    ERB seems to be the most straighforward for this case, it also does not bring a lot of dependencies.
    Just one - 'cgi'.
    
    In the same time there seems to be no method in URI or CGI or 'addressable' gem that would address this
    kireto committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    6dbbbd9 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2023

  1. Configuration menu
    Copy the full SHA
    00c2bdc View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2023

  1. Merge branch 'master' into grep_space_escape

    Getting version 1.4.0. of teaspoon
    thebravoman committed Dec 23, 2023
    Configuration menu
    Copy the full SHA
    ebedf82 View commit details
    Browse the repository at this point in the history