Merge pull request #21 from Tomas-A/master
Fixing a bug where ajax wouldn't grab whole document in case there was ampersands in link.
This commit is contained in:
+1
-1
@@ -2160,7 +2160,7 @@ $('a.biburl').each(function() { // for each url "[bibtex]"
|
|||||||
ev.preventDefault(); // no open url
|
ev.preventDefault(); // no open url
|
||||||
if (biburl.nextAll('pre').length == 0) { // we don't have yet the bibtex data
|
if (biburl.nextAll('pre').length == 0) { // we don't have yet the bibtex data
|
||||||
var bibtexEntryUrl = $(this).attr('href');
|
var bibtexEntryUrl = $(this).attr('href');
|
||||||
$.ajax({url: bibtexEntryUrl, dataType: 'xml', success: function (data) { // we download it
|
$.ajax({url: bibtexEntryUrl, dataType: 'html', success: function (data) { // we download it
|
||||||
// elem is the element containing bibtex entry, creating a new element is required for Chrome and IE
|
// elem is the element containing bibtex entry, creating a new element is required for Chrome and IE
|
||||||
var elem = $('<pre class="purebibtex"/>');
|
var elem = $('<pre class="purebibtex"/>');
|
||||||
elem.text($('.purebibtex', data).text()); // both text() are required for IE
|
elem.text($('.purebibtex', data).text()); // both text() are required for IE
|
||||||
|
|||||||
Reference in New Issue
Block a user