Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Commit

Permalink
Fixed bug where filtermodule fails if no img tags
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispont committed Mar 20, 2013
1 parent 2efc87f commit e41e2aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/FilterModule/MarkupParser.cs
Expand Up @@ -28,7 +28,10 @@ public string TransformImgToPicture(string content)
doc.OptionFixNestedTags = false;
doc.OptionAutoCloseOnEnd = false;
doc.OptionCheckSyntax = false;
foreach (HtmlNode img in doc.DocumentNode.SelectNodes("//img[@src]"))
HtmlNodeCollection collection = doc.DocumentNode.SelectNodes("//img[@src]");
if (collection == null)
return doc.DocumentNode.OuterHtml;
foreach (HtmlNode img in collection)
{
HtmlAttribute src = img.Attributes["src"];
if (src != null && src.Value.ToLowerInvariant().IndexOf("preset=.") != -1)
Expand Down
Binary file modified www/bin/ResponsivePresets.dll
Binary file not shown.

0 comments on commit e41e2aa

Please sign in to comment.