maccesch / cmsplugin-contact

Extendable contact plugin for django-cms with spam protection and i18n
BSD 2-Clause "Simplified" License
71 stars 62 forks source link

Javascript on ReCaptcha unencoded #4

Closed gregrobbins closed 13 years ago

gregrobbins commented 13 years ago

Hello, great plugin!

I am having an issue with the ReCaptcha javascript being unencoded when the page renders.

The javascript gets rendered inside

tags and has all < and > tangs converted to < and &rt;

Any ideas as to how to solve this? Thanks!

gregrobbins commented 13 years ago

I think I solved this on my own. In templates/cmsplugin_contact/contact.html at line 32 or so starts the block:

{% if form.recaptcha_challenge_field %} ... {% endif %}

Around this block I placed "autoescape off" tags so it ends up like this:

{% autoescape off %} {% if form.recaptcha_challenge_field %} ... {% endif %} {% endautoescape %}

Voilá! It works!

maccesch commented 13 years ago

Hi!

You probably installed glamkit-stopspam from PyPI via easy_install or pip. If you download the latest source from github this autoescape block shouldn't be necessary.