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

Apostrophes in attributes are escaped (prevents developer from using url tag) #50

Closed
bcoughlan opened this issue Nov 6, 2011 · 2 comments

Comments

@bcoughlan
Copy link
Collaborator

action: "{% url 'django.contrib.auth.views.login' %}"

renders as:

`action='{% url "django.contrib.auth.views.login" %}'``

Which is obviously problematic. Had a poke around the code but I'm not familiar enough with it yet to track down the problem.

Is there a need to escape apostrpohes at all. Given that it's a developers language I don't see any security risk posed by it.

@andreif
Copy link
Contributor

andreif commented Nov 7, 2011

I think this issue is related to #38 and #39. Using logic as a string with Django template tags is probably not the best idea. I believe we can add some original haml logic:

%form{action: url('django.contrib.auth.views.login')}

converted to:

<form action="{% url 'django.contrib.auth.views.login' %}">

@andreif
Copy link
Contributor

andreif commented Nov 7, 2011

You may be also interested in albsen#4 (comment)

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

No branches or pull requests

3 participants