@@ -1,3 +1,7 @@
|
||||
### 4.2.1
|
||||
|
||||
- fixes [issue #3](https://github.com/ceee/ReadSharp/issues/3)
|
||||
|
||||
### 4.2.0
|
||||
|
||||
- use custom encoders if not supported on platform (implemented for ISO-8859 and Windows range).
|
||||
|
||||
@@ -123,11 +123,14 @@ namespace ReadSharp.Ports.NReadability
|
||||
{ "http-equiv|Content-Type", "content" }
|
||||
});
|
||||
|
||||
int charsetStart = result.IndexOf("charset=");
|
||||
if (charsetStart > 0)
|
||||
if (!String.IsNullOrEmpty(result))
|
||||
{
|
||||
charsetStart += 8;
|
||||
result = result.Substring(charsetStart, result.Length - charsetStart);
|
||||
int charsetStart = result.IndexOf("charset=");
|
||||
if (charsetStart > 0)
|
||||
{
|
||||
charsetStart += 8;
|
||||
result = result.Substring(charsetStart, result.Length - charsetStart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,5 +119,15 @@ namespace ReadSharp.Tests
|
||||
Article result = await reader.Read(new Uri("http://www.uelike.com"));
|
||||
Assert.Equal(result.Title, expectedTitle);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task TestCriticalURIs()
|
||||
{
|
||||
Article result = await reader.Read(new Uri("http://www.jetbrains.com/resharper/whatsnew/index.html"));
|
||||
Assert.NotEmpty(result.Content);
|
||||
|
||||
result = await reader.Read(new Uri("http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx"));
|
||||
Assert.NotEmpty(result.Content);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,5 +22,5 @@
|
||||
// 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("4.2.0")]
|
||||
[assembly: AssemblyFileVersion("4.2.0")]
|
||||
[assembly: AssemblyVersion("4.2.1")]
|
||||
[assembly: AssemblyFileVersion("4.2.1")]
|
||||
Reference in New Issue
Block a user