Example #1
0
        public override string HandleImages(HtmlNode node)
        {
            if (node.Attributes.Contains("class"))
            {
                node.Attributes["class"].Value = "img";
            }
            else
            {
                node.Attributes.Add("class", "img");
            }
            string url = node.Attributes["src"].Value;

            string smiley = url.Replace(CoreConstants.SMILEY_PREFIX_1, "");

            smiley = url.Replace(CoreConstants.SMILEY_PREFIX_2, "");

            string html = String.Empty;

            if (url.Equals(smiley))
            {
                var parser = new ImageWebParser(node)
                {
                    IsInQuote = true
                };
                html = parser.Body;
                return(html);
            }
            return(node.OuterHtml);
        }
Example #2
0
        public override string HandleImages(HtmlNode node)
        {
            if (node.Attributes.Contains("class"))
            {
                node.Attributes["class"].Value = "img";
            }
            else
            {
                node.Attributes.Add("class", "img");
            }
            string url = node.Attributes["src"].Value;

            string smiley = url.Replace("fi.somethingawful", "");

            smiley = url.Replace("i.somethingawful", "");

            if (url.Equals(smiley))
            {
                string html = new ImageWebParser(node).Body;
                return(html);
            }
            return(node.OuterHtml);
        }
Example #3
0
        public override string HandleImages(HtmlNode node)
        {
            if (node.Attributes.Contains("class"))
            {
                node.Attributes["class"].Value = "img";
            }
            else
            {
                node.Attributes.Add("class", "img");
            }
            string url = node.Attributes["src"].Value;

            string smiley = url.Replace(CoreConstants.SMILEY_PREFIX_1, "");
            smiley = url.Replace(CoreConstants.SMILEY_PREFIX_2, "");

            string html = String.Empty;
            if (url.Equals(smiley))
            {
                var parser = new ImageWebParser(node) { IsInQuote = true };
                html = parser.Body;
                return html;
            }
            return node.OuterHtml;
        }
Example #4
0
        public override string HandleImages(HtmlNode node)
        {
            if (node.Attributes.Contains("class"))
            {
                node.Attributes["class"].Value = "img";
            }
            else
            {
                node.Attributes.Add("class", "img");
            }
            string url = node.Attributes["src"].Value;

            string smiley = url.Replace("fi.somethingawful", "");
            smiley = url.Replace("i.somethingawful", "");

            if (url.Equals(smiley))
            {
                string html = new ImageWebParser(node).Body;
                return html;
            }
            return node.OuterHtml;
        }