Fixed #18634 -- Don't escape variables in the context for startproject/startapp. #214

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Member

mjtamlyn commented Jul 16, 2012

The & symbols which can come up in the secret key were being escaped to &.

I'm not sure how to test this - there's no obvious way to fix the variables so they contain bad characters as we can't pass in extra options...

Owner

apollo13 commented Jul 17, 2012

Since 1.4 you can pass custom options to startproject, see: https://docs.djangoproject.com/en/dev/ref/django-admin/#startproject-projectname-destination -- if you look at the tests for this feature you can add your own template which tests with {{ bad_variable }} where bad_variable is supplied by you.

EDIT:// after chatting with @mjtamlyn it turned out that that it's not that easy to add custom variables to the template :/

Member

mjtamlyn commented Jul 17, 2012

(updated to make autoescape a keyword)

Member

mjtamlyn commented Jul 24, 2012

After discussion with @jezdez turns out the designed way to do this is to use a custom management command with extra options registered. This is now done and tested, and the string <&> renders as-is. I don't think any docs are needed.

EDIT:// upstream master rebased onto my branch

@mjtamlyn mjtamlyn Fixed #18634 -- Don't escape variables in the context for startprojec…
…t/startapp.

The & symbols which can come up in the secret key were
being escaped to &amp;.
16df0dc

apollo13 closed this Jul 25, 2012

Owner

apollo13 commented Jul 25, 2012

Fixed in a875f61, thx @mjtamlyn!

@nanuxbe nanuxbe pushed a commit to nanuxbe/django that referenced this pull request Jul 2, 2016

@olasitarska olasitarska Fixed #214 -- Moved all sidebars to the right. 3b57345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment