Revision: 21973
          http://sourceforge.net/p/bibdesk/svn/21973
Author:   hofman
Date:     2018-02-19 22:55:57 +0000 (Mon, 19 Feb 2018)
Log Message:
-----------
use scheme and host from site URL

Modified Paths:
--------------
    trunk/bibdesk/BDSKMASParser.m

Modified: trunk/bibdesk/BDSKMASParser.m
===================================================================
--- trunk/bibdesk/BDSKMASParser.m       2018-02-19 22:38:58 UTC (rev 21972)
+++ trunk/bibdesk/BDSKMASParser.m       2018-02-19 22:55:57 UTC (rev 21973)
@@ -84,6 +84,7 @@
     }
     
     AGRegex *idRegex = [AGRegex regexWithPattern:pattern];
+    NSURL *url = [self URL];
 
     for (NSXMLNode *node in nodes) {
         NSString *href = [node stringValueOfAttribute:@"href"];
@@ -95,7 +96,7 @@
         NSString *publicationID = [match groupAtIndex:1];
         
         // download BibTeX data
-        NSString *bibtexURLString = [NSString 
stringWithFormat:@"http://academic.research.microsoft.com/%@.bib?type=2&format=0";,
 publicationID];
+        NSString *bibtexURLString = [NSString 
stringWithFormat:@"%@://%@/%@.bib?type=2&format=0", [url scheme], [url host], 
publicationID];
         NSURL *bibtexURL = [NSURL URLWithString:bibtexURLString];
         
         NSURLRequest *request = [NSURLRequest requestWithURL:bibtexURL 
cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:60.0];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to