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
cubicweb
Commits
1790ec0af1a4
Commit
58e30e48
authored
May 04, 2021
by
Elouan Martinet
Browse files
fix(views): escape error message in ajax view
parent
7e82621d658a
Pipeline
#54121
passed with stage
in 2 minutes and 59 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
cubicweb/web/views/ajaxcontroller.py
View file @
1790ec0a
...
...
@@ -66,6 +66,7 @@ from functools import partial
from
datetime
import
datetime
from
logilab.common.registry
import
yes
from
logilab.mtconverter
import
xml_escape
from
cubicweb
import
ObjectNotFound
,
NoSelectableObject
,
ValidationError
from
cubicweb.appobject
import
AppObject
...
...
@@ -116,7 +117,7 @@ class AjaxController(Controller):
try
:
func
=
self
.
_cw
.
vreg
[
'ajax-func'
].
select
(
fname
,
self
.
_cw
)
except
ObjectNotFound
:
raise
RemoteCallFailed
(
'no %s method'
%
fname
,
raise
RemoteCallFailed
(
'no %s method'
%
xml_escape
(
fname
)
,
status
=
http_client
.
BAD_REQUEST
)
debug_mode
=
self
.
_cw
.
vreg
.
config
.
debugmode
# no <arg> attribute means the callback takes no argument
...
...
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