private IEnumerable <string> ProcessXhtml(string textFragment) { if (textFragment.StartsWith("<html")) { var crawler = new XhtmlCrawlingHelper(); crawler.SetPageContext(_currentPage); crawler.CrawlXhtml(textFragment); foreach (var fragment in crawler.TextParts) { yield return(fragment); } } else { yield return(textFragment); } }
private IEnumerable <string> ProcessXhtml(string textFragment) { if (textFragment.StartsWith("<html")) { var crawler = new XhtmlCrawlingHelper { CrawlFunctionParameters = _currentPage?.DataSourceId.PublicationScope == PublicationScope.Unpublished }; crawler.SetPageContext(_currentPage); crawler.CrawlXhtml(textFragment); foreach (var fragment in crawler.TextParts) { yield return(fragment); } } else { yield return(textFragment); } }