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

Added escaping tip #6633

Closed
wants to merge 1 commit into from
Closed

Added escaping tip #6633

wants to merge 1 commit into from

Conversation

xDaizu
Copy link
Contributor

@xDaizu xDaizu commented Jun 2, 2016

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

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
Copy link
Member

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?

@wouterj
Copy link
Member

wouterj commented Jul 2, 2016

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

wouterj added a commit that referenced this pull request Jul 8, 2016
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
wouterj added a commit that referenced this pull request Jul 8, 2016
@wouterj
Copy link
Member

wouterj commented Jul 8, 2016

Thanks @xDaizu for starting this PR. I've merged this into the 2.7 version and made some changes (including the comments here) in 8c4725b, it would be great if you can review those changes :)

@wouterj wouterj closed this Jul 8, 2016
@xDaizu
Copy link
Contributor Author

xDaizu commented Oct 31, 2016

I'm so sorry, @wouterj ! This notification went totally unnoticed! What's the status on this merge? Can I still help?

@wouterj
Copy link
Member

wouterj commented Oct 31, 2016

@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

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

Successfully merging this pull request may close these issues.

4 participants