From a197fc08e18d4c493572def05f1aa52fe518167b Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Mon, 10 Mar 2014 20:25:49 -0700 Subject: [PATCH] fixed display of description --- helios/models.py | 2 +- helios/templates/election_view.html | 2 +- server_ui/media/foundation-tweaks.css | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/helios/models.py b/helios/models.py index 17e757b..8f92737 100644 --- a/helios/models.py +++ b/helios/models.py @@ -192,7 +192,7 @@ class Election(HeliosModel): @property def description_bleached(self): - return bleach.clean(self.description, tags = bleach.ALLOWED_TAGS + ['p']) + return bleach.clean(self.description, tags = bleach.ALLOWED_TAGS + ['p', 'h4', 'h5', 'h3', 'h2', 'br']) @classmethod def get_featured(cls): diff --git a/helios/templates/election_view.html b/helios/templates/election_view.html index 92c6b2e..f1eb9e7 100644 --- a/helios/templates/election_view.html +++ b/helios/templates/election_view.html @@ -45,7 +45,7 @@ this {{election.election_type}} is <u>not</u> featured on the front page. <br clear="left" /> -<div style="margin-bottom: 25px;margin-left: 15px; border-left: 1px solid #aaa; padding-left: 5px; font-size:1.3em; "> +<div style="margin-bottom: 25px; "> {{election.description_bleached|safe}} </div> diff --git a/server_ui/media/foundation-tweaks.css b/server_ui/media/foundation-tweaks.css index e693c7e..cc60e28 100644 --- a/server_ui/media/foundation-tweaks.css +++ b/server_ui/media/foundation-tweaks.css @@ -62,4 +62,8 @@ height: 2.5em; select { width: auto; +} + +ul { + margin-left: 20px; } \ No newline at end of file -- GitLab