make wpcentral articles work again

This commit is contained in:
2014-07-17 09:49:25 +02:00
parent 6a579014f9
commit 5ba5ff3d78
3 changed files with 9 additions and 6 deletions
@@ -92,6 +92,9 @@ namespace ReadSharp.Ports.NReadability
private static XDocument LoadDocument(string htmlContent)
{
// I should not really do this, but I <3 WPCentral
htmlContent = htmlContent.Replace("src=\"javascript:'<html ><head ></head ><body ></body ></html >'\"", "");
using (var sgmlReader = new SgmlReader())
{
sgmlReader.CaseFolding = CaseFolding.ToLower;
+4 -4
View File
@@ -176,13 +176,13 @@ namespace ReadSharp.Tests
[Fact]
public async Task AreSinglepageArticlesNotPopulatingNextPage()
{
Article result = await reader.Read(new Uri("http://arstechnica.com/apple/2014/01/two-steps-forward-a-review-of-the-2013-mac-pro/7/"));
Assert.Null(result.NextPage);
result = await reader.Read(new Uri("http://www.wpcentral.com/developers-leak-new-features-windows-phone-81-sdk"), new ReadOptions() { MultipageDownload = true });
Article result = await reader.Read(new Uri("http://www.wpcentral.com/developers-leak-new-features-windows-phone-81-sdk"), new ReadOptions() { MultipageDownload = true });
Assert.Null(result.NextPage);
Assert.Equal(result.PageCount, 1);
result = await reader.Read(new Uri("http://arstechnica.com/apple/2014/01/two-steps-forward-a-review-of-the-2013-mac-pro/7/"));
Assert.Null(result.NextPage);
result = await reader.Read(new Uri("http://www.buzzfeed.com/mattlynley/the-16-most-interesting-things-to-come-out-of-bill-gates-qa"));
Assert.Null(result.NextPage);
+2 -2
View File
@@ -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("6.2.0")]
[assembly: AssemblyFileVersion("6.2.0")]
[assembly: AssemblyVersion("6.2.1")]
[assembly: AssemblyFileVersion("6.2.1")]