Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
activitystream
Commits
37c203352b77
Commit
0bd65152
authored
Sep 07, 2011
by
Sylvain Thénault
Browse files
properly escape content
parent
2dd810ae668e
Changes
1
Hide whitespace changes
Inline
Side-by-side
views.py
View file @
37c20335
from
logilab.mtconverter
import
xml_escape
from
cubicweb.selectors
import
is_instance
,
adaptable
from
cubicweb.view
import
EntityView
...
...
@@ -26,6 +27,7 @@ class AStreamItemView(EntityView):
u
'<span class="author">%s</span>'
u
'<span class="msgtxt">%s</span>'
u
'<span class="meta"><a href="%s">%s</a></span>'
u
'</div>'
%
(
activity
.
actor
,
activity
.
content
,
entity
.
absolute_url
(),
u
'</div>'
%
(
xml_escape
(
activity
.
actor
),
xml_escape
(
activity
.
content
),
xml_escape
(
entity
.
absolute_url
()),
self
.
_cw
.
format_date
(
activity
.
date
,
time
=
True
)))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment