From ec358232dcdf7e539d975a506e6f1a0eb23cdd7e Mon Sep 17 00:00:00 2001 From: Zambom Date: Mon, 23 Jan 2017 21:00:27 -0200 Subject: [PATCH] Adjusting webpage content input --- webpage/forms.py | 4 ++-- webpage/templates/webpages/window_view.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webpage/forms.py b/webpage/forms.py index be3a34d..22634fa 100644 --- a/webpage/forms.py +++ b/webpage/forms.py @@ -65,9 +65,9 @@ class WebpageForm(forms.ModelForm): def clean_content(self): content = self.cleaned_data.get('content', '') - content = strip_tags(content) + cleaned_content = strip_tags(content) - if content == '': + if cleaned_content == '': self._errors['content'] = [_('This field is required.')] return ValueError diff --git a/webpage/templates/webpages/window_view.html b/webpage/templates/webpages/window_view.html index ba04427..fb12009 100644 --- a/webpage/templates/webpages/window_view.html +++ b/webpage/templates/webpages/window_view.html @@ -1 +1 @@ -{{ webpage.content }} \ No newline at end of file +{{ webpage.content|safe }} -- libgit2 0.21.2