Skip to content

Fixes #5172 Fix curly bracket in regexp of @list_route #5177

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

Closed
wants to merge 1 commit into from

Conversation

no-dap
Copy link
Contributor

@no-dap no-dap commented May 25, 2017

Fixes #5172

if url_path contains curly brackets, these raise error while url_path.format() .

ex.
'{router_url}/(?P<year>[0-9]{4}){trailing_slash}'.format(router_url='some_url', trailing_slash='/')
{4} inside regex raise IndexError

so it need to replace single curly bracket to double.

@no-dap no-dap changed the title Fixed curly bracket in regexp of @list_route Fix curly bracket in regexp of @list_route May 25, 2017
@no-dap no-dap changed the title Fix curly bracket in regexp of @list_route Fixes #5172 Fix curly bracket in regexp of @list_route May 25, 2017
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a test case is also needed

@no-dap
Copy link
Contributor Author

no-dap commented May 26, 2017

@auvipy Seems it doesn't work when I only escape brackets (maybe). I glad to work on it this weekend.

@tomchristie
Copy link
Member

Going to close this off in its current state as it's not sufficiently clear what the intent is or why this does/doesn't fix anything. More than happy to consider a subsequent PR will a clearer rational or test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy