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 a source function to include the content of a template without rendering it #1257

Merged
merged 1 commit into from Nov 2, 2013

Conversation

fabpot
Copy link
Contributor

@fabpot fabpot commented Oct 31, 2013

Replaces #1230.

There is one question about the implementation: Should the content be considered safe (which is the current implementation)?

@TomiS
Copy link

TomiS commented Oct 31, 2013

@fabpot Great to see you were able to implement this! 👍

ps. I'm sorry I wasn't able to finish the PR I started in reasonable time. But client work must come first, as always. :/

@henrikbjorn
Copy link

+1 for considering it to be safe.

@Tobion
Copy link
Contributor

Tobion commented Oct 31, 2013

Regarding the name source it makes sense to be considered safe. Otherwise it should be named something like file to only load the text representation in escaped form.

@stof
Copy link
Member

stof commented Oct 31, 2013

@Tobion naming it file does not make sense. It does not load a file but the source of a template. There is 2 distinctions:

  • templates are not always stored in files (see the ArrayLoader for instance), even if it is the most common setup
  • the argument is not a filename but a template name (it is similar when the builtin FilesystemLoader without using the namespaced paths, but it is not anymore when using namespaced paths or the Symfony loader and its bundle convention)

@Tobion
Copy link
Contributor

Tobion commented Oct 31, 2013

@stof I didn't suggest to name it file. If you read carefully, you'll see I only gave an argument for having source be considered safe.

fabpot added a commit that referenced this pull request Nov 2, 2013
…plate without rendering it (fabpot)

This PR was merged into the master branch.

Discussion
----------

added a source function to include the content of a template without rendering it

Replaces #1230.

There is one question about the implementation: Should the content be considered safe (which is the current implementation)?

Commits
-------

dff7d2c added a source function to include the content of a template without rendering it
@fabpot fabpot merged commit dff7d2c into master Nov 2, 2013
@fabpot fabpot deleted the source branch April 27, 2014 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants