Changed: improved favicon parsing
This commit is contained in:
parent
d232f7b5ec
commit
ce49c7e062
@ -346,45 +346,53 @@ namespace bzit.bomg
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//link[@rel='shortcut icon']", "href", string.Empty);
|
||||
//rs = parseTagValue_Attr(doc, "//link[@rel='shortcut icon']", "href", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//link[translate(@rel, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'shortcut icon']", "href", string.Empty);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//link[@rel='icon']", "href", string.Empty);
|
||||
}
|
||||
//rs = parseTagValue_Attr(doc, "//link[@rel='icon']", "href", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//link[translate(@rel, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'icon']", "href", string.Empty);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//link[@rel='apple-touch-icon']", "href", string.Empty);
|
||||
}
|
||||
//rs = parseTagValue_Attr(doc, "//link[@rel='apple-touch-icon']", "href", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//link[translate(@rel, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'apple-touch-icon']", "href", string.Empty);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//link[@rel='apple-touch-icon-precomposed']", "href", string.Empty);
|
||||
}
|
||||
//rs = parseTagValue_Attr(doc, "//link[@rel='apple-touch-icon-precomposed']", "href", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//link[translate(@rel, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'apple-touch-icon-precomposed']", "href", string.Empty);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//meta[@property='og:image']", "content", string.Empty);
|
||||
}
|
||||
//rs = parseTagValue_Attr(doc, "//meta[@property='og:image']", "content", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//meta[translate(@property, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'og:image']", "content", string.Empty);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//meta[@name='twitter:image']", "content", string.Empty);
|
||||
}
|
||||
//rs = parseTagValue_Attr(doc, "//meta[@name='twitter:image']", "content", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//meta[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'twitter:image']", "content", string.Empty);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//meta[@property='og:image']", "content", string.Empty);
|
||||
}
|
||||
//rs = parseTagValue_Attr(doc, "//meta[@property='og:image']", "content", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//meta[translate(@property, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'og:image']", "content", string.Empty);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
if (string.IsNullOrWhiteSpace(rs))
|
||||
{
|
||||
rs = parseTagValue_Attr(doc, "//meta[@itemprop='image']", "content", string.Empty);
|
||||
}
|
||||
//rs = parseTagValue_Attr(doc, "//meta[@itemprop='image']", "content", string.Empty);
|
||||
rs = parseTagValue_Attr(doc, "//meta[translate(@itemprop, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'image']", "content", string.Empty);
|
||||
}
|
||||
|
||||
return rs;
|
||||
return rs;
|
||||
}
|
||||
}
|
||||
}
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.3.0.013")]
|
||||
[assembly: AssemblyVersion("0.3.0.014")]
|
||||
[assembly: AssemblyFileVersion("0.1.0.0")]
|
||||
|
2
Properties/Resources.Designer.cs
generated
2
Properties/Resources.Designer.cs
generated
@ -89,7 +89,7 @@ namespace bzit.bomg.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 0.3.0.013 beta.
|
||||
/// Looks up a localized string similar to 0.3.0.014 beta.
|
||||
/// </summary>
|
||||
internal static string app_version {
|
||||
get {
|
||||
|
@ -128,7 +128,7 @@
|
||||
<value>Bookmark Manager</value>
|
||||
</data>
|
||||
<data name="app_version" xml:space="preserve">
|
||||
<value>0.3.0.013 beta</value>
|
||||
<value>0.3.0.014 beta</value>
|
||||
</data>
|
||||
<data name="arrow_down_circle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\2\arrow-down-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
Reference in New Issue
Block a user