Revision: 28015
http://sourceforge.net/p/bibdesk/svn/28015
Author: hofman
Date: 2022-10-12 09:38:21 +0000 (Wed, 12 Oct 2022)
Log Message:
-----------
use only host and path as fallback title
Modified Paths:
--------------
trunk/bibdesk/BDSKWebView.m
Modified: trunk/bibdesk/BDSKWebView.m
===================================================================
--- trunk/bibdesk/BDSKWebView.m 2022-10-12 09:30:44 UTC (rev 28014)
+++ trunk/bibdesk/BDSKWebView.m 2022-10-12 09:38:21 UTC (rev 28015)
@@ -420,7 +420,14 @@
title = [[[[frame DOMDocument] nodesForXPath:@"/html/head/title"]
firstObject] stringValue];
if ([NSString isEmptyString:title]) {
NSURL *url = [[[frame dataSource] request] URL];
- title = [url isFileURL] ? [[url path] lastPathComponent] :
[[url absoluteString] stringByRemovingPercentEncoding];
+ if ([url isFileURL]) {
+ title = [[url path] lastPathComponent];
+ } else {
+ title = [[url host] stringByRemovingPercentEncoding];
+ NSString *path = [[url path]
stringByRemovingPercentEncoding];
+ if (path)
+ title = [title stringByAppendingString:path];
+ }
}
}
if ([sender respondsToSelector:@selector(retrieveFavicon)])
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