Skip to content

Commit

Permalink
SAK-33920 Preferences hidden sites shows html entities for non-englis…
Browse files Browse the repository at this point in the history
…h characters (sakaiproject#5312)
  • Loading branch information
juanjmerono authored and ern committed Feb 19, 2018
1 parent 47bc5d1 commit 2f5fbce
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions user/user-tool-prefs/tool/src/webapp/js/manage-hidden-sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ $(function () {
target.append(leftPane);
target.append(rightPane);

var decodeEntities = function(encodedString) {
var textArea = document.createElement('textarea');
textArea.innerHTML = encodedString;
return textArea.value;
};

// Group sites by term with appropriate checkboxes
$('.term', '#sitesByTerm').each(function (i, term) {
var title = $('h2', term);
var termType = $.trim($('.term-type', term).text());
var sites = $('.site', term).map(function () {
return {
siteid: $(this).find('.site-id').text(),
title: $(this).find('.site-title').text(),
description: $(this).find('.site-short-description').text(),
title: decodeEntities($(this).find('.site-title').text()),
description: decodeEntities($(this).find('.site-short-description').text()),
tooltip: $(this).find('.site-titleFull').text()
};
}).toArray();
Expand Down

0 comments on commit 2f5fbce

Please sign in to comment.