Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
comment
Commits
dbdedcedff5c
Commit
dbdedcedff5c
authored
15 years ago
by
Sandrine Ribeau
Browse files
Options
Downloads
Patches
Plain Diff
[views] use xml_escape instead of html_escape
parent
52afeac04d88
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
views.py
+8
-8
8 additions, 8 deletions
views.py
with
8 additions
and
8 deletions
views.py
+
8
−
8
View file @
dbdedced
...
...
@@ -9,7 +9,7 @@
from
itertools
import
count
from
logilab.mtconverter
import
ht
ml_escape
from
logilab.mtconverter
import
x
ml_escape
from
logilab.common.decorators
import
monkeypatch
from
simplejson
import
dumps
...
...
@@ -24,7 +24,7 @@
from
cubicweb.web.action
import
LinkToEntityAction
,
Action
from
cubicweb.web.form
import
FormViewMixIn
from
cubicweb.web.formwidgets
import
Button
from
cubicweb.web.views
import
primary
,
baseviews
from
cubicweb.web.views
import
primary
,
baseviews
,
xmlrss
from
cubicweb.web.component
import
EntityVComponent
from
cubicweb.web.views.basecontrollers
import
JSonController
...
...
@@ -88,7 +88,7 @@
entity
=
self
.
entity
(
row
,
col
)
root
=
entity
.
root
()
self
.
w
(
u
'
[<a href=
"
%s
"
>#%s</a>]
'
%
(
ht
ml_escape
(
root
.
absolute_url
()),
root
.
eid
))
%
(
x
ml_escape
(
root
.
absolute_url
()),
root
.
eid
))
maxsize
=
self
.
req
.
property_value
(
'
navigation.short-line-size
'
)
maxsize
=
maxsize
-
len
(
str
(
root
.
eid
))
content
=
entity
.
printable_value
(
'
content
'
,
format
=
'
text/plain
'
)
...
...
@@ -92,5 +92,5 @@
maxsize
=
self
.
req
.
property_value
(
'
navigation.short-line-size
'
)
maxsize
=
maxsize
-
len
(
str
(
root
.
eid
))
content
=
entity
.
printable_value
(
'
content
'
,
format
=
'
text/plain
'
)
content
=
ht
ml_escape
(
cut
(
content
,
maxsize
))
content
=
x
ml_escape
(
cut
(
content
,
maxsize
))
self
.
w
(
u
'
<a href=
"
%s
"
>#%s <i>%s</i></a>
\n
'
%
(
...
...
@@ -96,5 +96,5 @@
self
.
w
(
u
'
<a href=
"
%s
"
>#%s <i>%s</i></a>
\n
'
%
(
ht
ml_escape
(
entity
.
absolute_url
()),
entity
.
eid
,
content
))
x
ml_escape
(
entity
.
absolute_url
()),
entity
.
eid
,
content
))
class
CommentTreeItemView
(
baseviews
.
ListItemView
):
...
...
@@ -118,11 +118,11 @@
'
comment%sHolder
'
%
entity
.
eid
,
rql_for_eid
(
entity
.
eid
),
'
inlinecomment
'
)
reply
=
'
| %s <a href=
"
%s
"
> %s </a>
'
%
(
_login_register_link
(
self
),
ht
ml_escape
(
url
),
_
(
action
.
title
))
x
ml_escape
(
url
),
_
(
action
.
title
))
if
editaction
is
None
:
edit
=
u
''
else
:
url
=
self
.
req
.
build_ajax_replace_url
(
'
comment%s
'
%
entity
.
eid
,
rql_for_eid
(
entity
.
eid
),
'
editcomment
'
)
...
...
@@ -123,10 +123,10 @@
if
editaction
is
None
:
edit
=
u
''
else
:
url
=
self
.
req
.
build_ajax_replace_url
(
'
comment%s
'
%
entity
.
eid
,
rql_for_eid
(
entity
.
eid
),
'
editcomment
'
)
edit
=
'
| <a href=
"
%s
"
>%s</a>
'
%
(
ht
ml_escape
(
url
),
edit
=
'
| <a href=
"
%s
"
>%s</a>
'
%
(
x
ml_escape
(
url
),
_
(
editaction
.
title
))
text
=
entity
.
printable_value
(
'
content
'
)
if
not
kwargs
.
get
(
'
full
'
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment