Revision: 28283
http://sourceforge.net/p/bibdesk/svn/28283
Author: hofman
Date: 2023-06-04 16:01:41 +0000 (Sun, 04 Jun 2023)
Log Message:
-----------
check whether returned data for DOI parser is bibtex, it may return a not found
HTML page instead
Modified Paths:
--------------
trunk/bibdesk/BDSKDOIParser.m
Modified: trunk/bibdesk/BDSKDOIParser.m
===================================================================
--- trunk/bibdesk/BDSKDOIParser.m 2023-06-04 14:53:19 UTC (rev 28282)
+++ trunk/bibdesk/BDSKDOIParser.m 2023-06-04 16:01:41 UTC (rev 28283)
@@ -88,7 +88,7 @@
if (encoding == kCFStringEncodingInvalidId)
encoding = NSUTF8StringEncoding;
bibtexString = [[[[NSString alloc] initWithData:data
encoding:encoding] autorelease] stringByRemovingSurroundingWhitespace];
- if (bibtexString) {
+ if (bibtexString && [BDSKBibTeXParser canParseString:bibtexString]) {
NSError *error = nil;
item = [[BDSKBibTeXParser itemsFromString:bibtexString owner:owner
error:&error] firstObject];
if ([error isLocalErrorWithCode:kBDSKBibTeXParserFailed])
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit