fix & in studio, alternative title, fixes #1475

This commit is contained in:
j 2013-04-17 09:50:28 +00:00
parent c0a5fccc04
commit 4bff07f054

View file

@ -458,8 +458,8 @@ pandora.ui.infoView = function(data) {
if (value != data[key]) { if (value != data[key]) {
var edit = {id: data.id}; var edit = {id: data.id};
if (key == 'alternativeTitles') { if (key == 'alternativeTitles') {
edit[key] = value ? value.split('; ').map(function(value) { edit[key] = value ? Ox.decodeHTMLEntities(value).split('; ').map(function(value) {
return [value, []]; return [Ox.encodeHTMLEntities(value), []];
}) : []; }) : [];
data[key] = edit[key]; data[key] = edit[key];
$alternativeTitles.html(formatKey(key)); $alternativeTitles.html(formatKey(key));
@ -471,7 +471,9 @@ pandora.ui.infoView = function(data) {
} else if (listKeys.indexOf(key) > -1) { } else if (listKeys.indexOf(key) > -1) {
edit[key] = value ? value.split(', ') : []; edit[key] = value ? value.split(', ') : [];
} else if (specialListKeys.indexOf(key) > -1) { } else if (specialListKeys.indexOf(key) > -1) {
edit[key] = value ? value.split('; ') : []; edit[key] = value
? Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities)
: [];
} else { } else {
edit[key] = value; edit[key] = value;
} }
@ -568,9 +570,13 @@ pandora.ui.infoView = function(data) {
} else if (listKeys.indexOf(key) > -1) { } else if (listKeys.indexOf(key) > -1) {
ret = formatLink(value.split(', '), key); ret = formatLink(value.split(', '), key);
} else if (key == 'alternativeTitles') { } else if (key == 'alternativeTitles') {
ret = formatLink(value.split('; '), 'title'); ret = formatLink(
Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities),
'title');
} else if (specialListKeys.indexOf(key) > -1) { } else if (specialListKeys.indexOf(key) > -1) {
ret = formatLink(value.split('; '), key); ret = formatLink(
Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities),
key);
} else if (key == 'imdbId') { } else if (key == 'imdbId') {
ret = '<a href="http://www.imdb.com/title/tt' ret = '<a href="http://www.imdb.com/title/tt'
+ value + '">' + value + '</a>'; + value + '">' + value + '</a>';