diff --git a/app/assets/javascripts/bibliography.js b/app/assets/javascripts/bibliography.js index 1e992b736..3d0d80bbf 100644 --- a/app/assets/javascripts/bibliography.js +++ b/app/assets/javascripts/bibliography.js @@ -56,15 +56,13 @@ if (index > toggleIndex && total > toggleThreshold) { elClass += ' hide-bibliography'; } - var parsedHtml = $.map($.parseHTML($.parseHTML(bibEntry.attributes.formatted_bibliography_ts.attributes.value)[0].textContent), function(value) { - // If it is HTML, return that, if not just return the text - if (value.outerHTML) { - return value.outerHTML; - } - return value.textContent; - }).join(''); + + // This string contains the formatted bibliography for this item. + // This string can contain HTML elements as well which should be displayed correctly. + var formatted_bibliography = bibEntry.attributes.formatted_bibliography_ts.attributes.value; + return '

' + - parsedHtml + + formatted_bibliography + ' ' + '[View full reference]' + '' +