mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 18:29:23 +00:00
Fix new line bug in leaving message and escape message replies to show <br />
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
{% endif %}
|
||||
|
||||
<div id="group-reply">
|
||||
<h3>留言板</h3>
|
||||
<h3>信息栏</h3>
|
||||
<form action="" method="post">
|
||||
<textarea name="message" id="message">{{ form.data.message }}</textarea><br />
|
||||
{% for error in form.message.errors %}
|
||||
@@ -102,7 +102,7 @@
|
||||
<a href="{{ SITE_ROOT }}profile/{{ msg.from_email }}/">{{ msg.from_email|email2nickname }}</a>
|
||||
</div>
|
||||
<div class="msg-bd">
|
||||
<p>{{ msg.message|urlize|url_target_blank|find_at }}</p>
|
||||
<p>{{ msg.message|linebreaksbr|urlize|url_target_blank|find_at }}</p>
|
||||
{% if msg.reply_cnt == 0 %}
|
||||
<a class="reply op" href="#" data="{{ msg.id }}">回复</a>
|
||||
{% else %}
|
||||
|
@@ -241,7 +241,8 @@ def msg_reply(request, msg_id):
|
||||
d = {}
|
||||
d['from_email'] = e.from_email
|
||||
d['nickname'] = e.nickname
|
||||
d['message'] = e.message
|
||||
from django.utils.html import escape
|
||||
d['message'] = escape(e.message)
|
||||
l.append(d)
|
||||
|
||||
return HttpResponse(json.dumps(l), content_type=content_type)
|
||||
|
Reference in New Issue
Block a user