mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-23 04:18:21 +00:00
[lib] added necessary 'escape'
Conflicts: seahub/views/ajax.py
This commit is contained in:
@@ -695,7 +695,7 @@ def delete_dirent(request, repo_id):
|
||||
content_type=content_type)
|
||||
except SearpcError, e:
|
||||
logger.error(e)
|
||||
err_msg = _(u'Internal error. Failed to delete %s.') % dirent_name
|
||||
err_msg = _(u'Internal error. Failed to delete %s.') % escape(dirent_name)
|
||||
return HttpResponse(json.dumps({'error': err_msg}),
|
||||
status=500, content_type=content_type)
|
||||
|
||||
@@ -841,7 +841,7 @@ def cp_file(src_repo_id, src_path, dst_repo_id, dst_path, obj_name, username):
|
||||
content_type=content_type)
|
||||
|
||||
result['success'] = True
|
||||
msg = _(u'Successfully copied %(name)s') % {"name":escape(obj_name)}
|
||||
msg = _(u'Successfully copied %(name)s') % {"name": escape(obj_name)}
|
||||
result['msg'] = msg
|
||||
|
||||
if res.background:
|
||||
@@ -886,7 +886,7 @@ def mv_dir(src_repo_id, src_path, dst_repo_id, dst_path, obj_name, username):
|
||||
content_type=content_type)
|
||||
|
||||
result['success'] = True
|
||||
msg = _(u'Successfully moved %(name)s') % {"name":escape(obj_name)}
|
||||
msg = _(u'Successfully moved %(name)s') % {"name": escape(obj_name)}
|
||||
result['msg'] = msg
|
||||
if res.background:
|
||||
result['task_id'] = res.task_id
|
||||
@@ -929,7 +929,7 @@ def cp_dir(src_repo_id, src_path, dst_repo_id, dst_path, obj_name, username):
|
||||
content_type=content_type)
|
||||
|
||||
result['success'] = True
|
||||
msg = _(u'Successfully copied %(name)s') % {"name":escape(obj_name)}
|
||||
msg = _(u'Successfully copied %(name)s') % {"name": escape(obj_name)}
|
||||
result['msg'] = msg
|
||||
if res.background:
|
||||
result['task_id'] = res.task_id
|
||||
|
Reference in New Issue
Block a user