Skip to content

Use django's escape when using django templates#236

Open
quantum5 wants to merge 1 commit intosyrusakbary:masterfrom
DMOJ:django-escape
Open

Use django's escape when using django templates#236
quantum5 wants to merge 1 commit intosyrusakbary:masterfrom
DMOJ:django-escape

Conversation

@quantum5
Copy link
Copy Markdown

Using pyjade.runtime.escape is fine in most situations, but when dealing with django-specific things, like lazy objects, or safe strings, pyjade.runtime.escape treats them as arbitrary objects, calling str on them.

For safe strings, this means they get escaped again. For lazy objects, it means they get forcefully converted into str even if they are unicode strings.

@syrusakbary syrusakbary force-pushed the master branch 3 times, most recently from 4a76e8a to eb84811 Compare January 7, 2016 17:08
@kakulukia
Copy link
Copy Markdown

Since there are no updates to pyjade and its successor recently was deleted from pypi, I took the liberty to revive it: https://github.com/kakulukia/pypugjs

Version 5.0.1 has fixed the incompatibility with recent Django versions.
I'll be happy to merge this, when you resubmit the PR to my repo.

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.

2 participants