Permalink
Browse files

Added CSRF Protection to text plugins for embbed plugins (thanks to M…

…anuel Schmidt and kar1m for helping with this)
  • Loading branch information...
Jonas Obrist
Jonas Obrist committed Feb 16, 2011
1 parent d8e011a commit abf79bbcbb52f2193febe55e44b9d54687127f6f
Showing with 9 additions and 0 deletions.
  1. +9 −0 cms/plugins/text/templates/cms/plugins/text_plugin_change_form.html
@@ -1,7 +1,16 @@
{% extends "admin/cms/page/plugin_change_form.html" %}
+{% load adminmedia %}
{% block fieldsets %}
{% for fieldset in adminform %}
{% include "cms/plugins/text_plugin_fieldset.html" %}
{% endfor %}
+<script type="text/javascript" src="{{ CMS_MEDIA_URL }}js/csrf.js"></script>
+<script type="text/javascript">
+(function ($){
+ $(document).ready(function(){
+ $.fn.cmsPatchCSRF();
+ });
+})(jQuery);
+</script>
{% endblock %}

0 comments on commit abf79bb

Please sign in to comment.