Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
b4f84a2d
Commit
b4f84a2d
authored
Nov 15, 2012
by
Kostas Papadimitriou
Browse files
Avoid double escaping of image metadata
image model get_meta already takes care of escaping the meta value
parent
2d250381
Changes
1
Show whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_create_view.js
View file @
b4f84a2d
...
@@ -359,7 +359,7 @@
...
@@ -359,7 +359,7 @@
update_image_details
:
function
(
image
)
{
update_image_details
:
function
(
image
)
{
this
.
image_details_desc
.
hide
().
parent
().
hide
();
this
.
image_details_desc
.
hide
().
parent
().
hide
();
if
(
image
.
get_description
())
{
if
(
image
.
get_description
())
{
this
.
image_details_desc
.
text
(
image
.
get_description
(
tru
e
)).
show
().
parent
().
show
();
this
.
image_details_desc
.
html
(
image
.
get_description
(
fals
e
)).
show
().
parent
().
show
();
}
}
var
img
=
snf
.
ui
.
helpers
.
os_icon_tag
(
image
.
escape
(
"
OS
"
))
var
img
=
snf
.
ui
.
helpers
.
os_icon_tag
(
image
.
escape
(
"
OS
"
))
if
(
image
.
get
(
"
name
"
))
{
if
(
image
.
get
(
"
name
"
))
{
...
@@ -404,7 +404,7 @@
...
@@ -404,7 +404,7 @@
}
}
var
row_cls
=
key
.
toLowerCase
();
var
row_cls
=
key
.
toLowerCase
();
if
(
is_extra
)
{
row_cls
+=
"
extra-meta
"
};
if
(
is_extra
)
{
row_cls
+=
"
extra-meta
"
};
extra_details
.
append
(
detail_tpl
.
format
(
_
.
escape
(
label
),
_
.
escape
(
value
)
,
row_cls
));
extra_details
.
append
(
detail_tpl
.
format
(
_
.
escape
(
label
),
value
,
row_cls
));
}
}
_
.
each
(
meta_keys
,
function
(
key
)
{
_
.
each
(
meta_keys
,
function
(
key
)
{
...
@@ -464,7 +464,7 @@
...
@@ -464,7 +464,7 @@
img
.
id
,
img
.
id
,
snf
.
ui
.
helpers
.
os_icon_tag
(
img
.
escape
(
"
OS
"
)),
snf
.
ui
.
helpers
.
os_icon_tag
(
img
.
escape
(
"
OS
"
)),
_
.
escape
(
img
.
get_readable_size
()),
_
.
escape
(
img
.
get_readable_size
()),
util
.
truncate
(
img
.
get_description
(),
35
),
util
.
truncate
(
img
.
get_description
(
false
),
35
),
_
.
escape
(
img
.
display_owner
())));
_
.
escape
(
img
.
display_owner
())));
image
.
data
(
"
image
"
,
img
);
image
.
data
(
"
image
"
,
img
);
image
.
data
(
"
image_id
"
,
img
.
id
);
image
.
data
(
"
image_id
"
,
img
.
id
);
...
...
Write
Preview
Markdown
is supported
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