no html (i.e. chev-rights) in saved bookmark and history json

This commit is contained in:
Hannes Mannerheim 2015-11-19 15:38:25 +01:00
parent 65ca7bce0d
commit 527b4ec86d

View File

@ -1189,7 +1189,7 @@ function saveAllBookmarks() {
$.each($('#bookmark-container .stream-selection'), function(key,obj) { $.each($('#bookmark-container .stream-selection'), function(key,obj) {
bookmarkContainer[i] = new Object(); bookmarkContainer[i] = new Object();
bookmarkContainer[i].dataStreamHref = $(obj).attr('href'); bookmarkContainer[i].dataStreamHref = $(obj).attr('href');
bookmarkContainer[i].dataStreamHeader = $(obj).html(); bookmarkContainer[i].dataStreamHeader = $(obj).text();
i++; i++;
}); });
@ -1211,7 +1211,7 @@ function appendAllBookmarks(bookmarkContainer) {
$('#bookmark-container').html(''); $('#bookmark-container').html('');
var bookmarkContainerParsed = JSON.parse(bookmarkContainer); var bookmarkContainerParsed = JSON.parse(bookmarkContainer);
$.each(bookmarkContainerParsed, function(key,obj) { $.each(bookmarkContainerParsed, function(key,obj) {
$('#bookmark-container').append('<a class="stream-selection" href="' + obj.dataStreamHref + '">' + obj.dataStreamHeader + '</i><i class="chev-right" data-tooltip="' + window.sL.tooltipRemoveBookmark + '"></i></a>'); $('#bookmark-container').append('<a class="stream-selection" href="' + obj.dataStreamHref + '">' + obj.dataStreamHeader + '<i class="chev-right" data-tooltip="' + window.sL.tooltipRemoveBookmark + '"></i></a>');
}); });
} }
$('#bookmark-container').sortable({delay: 100}); $('#bookmark-container').sortable({delay: 100});
@ -1232,7 +1232,7 @@ function updateHistoryLocalStorage() {
$.each($('#history-container .stream-selection'), function(key,obj) { $.each($('#history-container .stream-selection'), function(key,obj) {
historyContainer[i] = new Object(); historyContainer[i] = new Object();
historyContainer[i].dataStreamHref = $(obj).attr('href'); historyContainer[i].dataStreamHref = $(obj).attr('href');
historyContainer[i].dataStreamHeader = $(obj).html(); historyContainer[i].dataStreamHeader = $(obj).text();
i++; i++;
}); });
localStorageObjectCache_STORE('browsingHistory', window.loggedIn.screen_name,historyContainer); localStorageObjectCache_STORE('browsingHistory', window.loggedIn.screen_name,historyContainer);
@ -1259,7 +1259,7 @@ function loadHistoryFromLocalStorage() {
$('#history-container').css('display','block'); $('#history-container').css('display','block');
$('#history-container').html(''); $('#history-container').html('');
$.each(cacheData, function(key,obj) { $.each(cacheData, function(key,obj) {
$('#history-container').append('<a class="stream-selection" href="' + obj.dataStreamHref + '">' + obj.dataStreamHeader + '</i><i class="chev-right" data-tooltip="' + window.sL.tooltipBookmarkStream + '"></i></a>'); $('#history-container').append('<a class="stream-selection" href="' + obj.dataStreamHref + '">' + obj.dataStreamHeader + '<i class="chev-right" data-tooltip="' + window.sL.tooltipBookmarkStream + '"></i></a>');
}); });
} }
updateHistoryLocalStorage(); updateHistoryLocalStorage();