-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Added escaping tip #6633
Added escaping tip #6633
Conversation
Added a tip under the "Generating URLs from a Template" section to remind users of proper escaping if they are generating routes in a JS context
@@ -1550,6 +1550,18 @@ a template helper function: | |||
Read this blog post. | |||
</a> | |||
|
|||
.. tip:: | |||
|
|||
If you are generating the route inside a script tag, you might need to properly escape it for Javascript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should end the sentence with a colon. And can you please also wrap this paragraph after the first word that crosses the 72nd character?
Hi @xDaizu. Do you have some time to apply the comments (if you agree)? If you don't have time, feel free to say so and we'll finish this PR. Thanks! status: needs work |
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #6633). Discussion ---------- Added escaping tip Added a tip under the "Generating URLs from a Template" section to remind users of proper escaping if they are generating routes in a JS context Commits ------- 3893c72 Added escaping tip
I'm so sorry, @wouterj ! This notification went totally unnoticed! What's the status on this merge? Can I still help? |
@xDaizu the merge was done when I posted this comment (so July 8th). You can review the few things I changed in 8c4725b , but I think all is good. In the meantime, during the documentation restructuring, we created a completely new sub-guide from your addition here: http://symfony.com/doc/current/routing/generate_url_javascript.html |
Added a tip under the "Generating URLs from a Template" section to remind users of proper escaping if they are generating routes in a JS context