Proper linebreaks.

master
q3k 2012-10-18 22:40:41 +02:00
parent ac9abc9867
commit d6c2e9d71d
3 changed files with 16 additions and 2 deletions

View File

@ -329,6 +329,7 @@ p.quotetext {
font-family: Terminus, Consolas, Monaco, Courier New, monospace !important;
font-size: 14px !important;
padding: 8px !important;
line-height: 14px !important;
}
div.quoteheader a {
@ -387,3 +388,16 @@ input.form-submit {
display: block;
margin: 0 0 10px 10px;
}
ul.form-errors {
margin: 0 0 0 10px;
padding: 0;
}
ul.form-errors li {
list-style: none;
color: red;
font-weight: bold;
font-size: 12px;
}

View File

@ -24,7 +24,7 @@
{% endif %}
{{ quote.date }}
</div>
<p class="quotetext">{{ quote.text }}</p>
<p class="quotetext">{{ quote.text|safe }}</p>
</div>
{% endfor %}
{% endblock %}

View File

@ -12,7 +12,7 @@ def get_quotes():
quote["score"] += str(score)
quote["votes"] = str(_up + _down)
quote["date"] = time.strftime("%y-%m-%d %H:%M %Z", time.localtime(_date))
quote["text"] = _text
quote["text"] = unicode(flask.escape(_text)).replace("\r\n", "<br />").replace("\r", "<br \>")
quote["user_score"] = get_user_votes(_id)
quotes.append(quote)
return quotes