Added cleaning to student proposal content and the contents of the reviews.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 25 Mar 2009 14:07:21 +0000
changeset 2006 8b7b5bc9abe2
parent 2005 c55051b20017
child 2007 56da71f13f3a
Added cleaning to student proposal content and the contents of the reviews. Addresses Issue 433. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/models/student_proposal.py
--- a/app/soc/views/models/student_proposal.py	Wed Mar 25 08:46:28 2009 +0000
+++ b/app/soc/views/models/student_proposal.py	Wed Mar 25 14:07:21 2009 +0000
@@ -126,6 +126,7 @@
             required=True),
         'organization': forms.CharField(label='Organization Link ID',
             required=True),
+        'clean_content': cleaning.clean_html_content('content'),
         'clean_organization': cleaning.clean_link_id('organization'),
         'clean_additional_info': cleaning.clean_url('additional_info'),
         'clean': cleaning.validate_student_proposal('organization',
@@ -174,6 +175,7 @@
          ]
 
     dynaproperties = params_helper.getDynaFields(dynafields)
+    dynaproperties['clean_comment'] = cleaning.clean_html_content('comment')
 
     public_review_form = dynaform.newDynaForm(dynamodel=None, 
         dynabase=helper.forms.BaseForm, dynainclude=None, 
@@ -217,6 +219,7 @@
          ]
 
     dynaproperties = params_helper.getDynaFields(dynafields)
+    dynaproperties['clean_comment'] = cleaning.clean_html_content('comment')
 
     mentor_review_form = dynaform.newDynaForm(dynamodel=None, 
         dynabase=helper.forms.BaseForm, dynainclude=None, 
@@ -246,6 +249,7 @@
       ]
 
     dynaproperties = params_helper.getDynaFields(dynafields)
+    dynaproperties['clean_comment'] = cleaning.clean_html_content('comment')
 
     admin_review_form = dynaform.extendDynaForm(dynaform=mentor_review_form, 
         dynaproperties=dynaproperties)