public HtmlFormatterFilter(HtmlFilterSettings settings, HtmlElementRule container, HtmlElementBuilder element, StringWriter output) : base(TextReader.Null, output, settings) { _contents = output.GetStringBuilder(); _container = container; _element = element; }
public HtmlFormatterFilter(HtmlFilterSettings settings, HtmlElementRule container, HtmlElementBuilder element, StringWriter output) : base(TextReader.Null, output, settings) { _contents = output.GetStringBuilder(); _container = container; _element = element; }
/// <summary> /// Initializes a new instance of the /// <see cref="Radischevo.Wahha.Web.Text.HtmlFilter"/> class. /// </summary> public HtmlFilter(TextReader reader, TextWriter writer, HtmlFilterSettings settings) { Precondition.Require(reader, () => Error.ArgumentNull("reader")); Precondition.Require(writer, () => Error.ArgumentNull("writer")); _settings = settings ?? new HtmlFilterSettings( HtmlFilteringMode.AllowByDefault); _reader = CreateHtmlReader(reader, settings); _writer = new XmlTextWriter(writer); }
/// <summary> /// Initializes a new instance of the /// <see cref="Radischevo.Wahha.Web.Text.HtmlFilter"/> class. /// </summary> public HtmlFilter(TextReader reader, TextWriter writer, HtmlFilterSettings settings) { Precondition.Require(reader, () => Error.ArgumentNull("reader")); Precondition.Require(writer, () => Error.ArgumentNull("writer")); _settings = settings ?? new HtmlFilterSettings( HtmlFilteringMode.AllowByDefault); _reader = CreateHtmlReader(reader, settings); _writer = new XmlTextWriter(writer); }
private static XmlReader CreateHtmlReader(TextReader reader, HtmlFilterSettings settings) { SgmlReader sgml = new SgmlReader(); sgml.DocType = "html"; sgml.WhitespaceHandling = (settings.PreserveWhitespace) ? WhitespaceHandling.All : WhitespaceHandling.None; sgml.CaseFolding = CaseFolding.ToLower; sgml.InputStream = reader; return(sgml); }
/// <summary> /// Initializes a new instance of the /// <see cref="Radischevo.Wahha.Web.Text.HtmlProcessor"/> class. /// </summary> public HtmlProcessor() { _filter = new HtmlFilterSettings( HtmlFilteringMode.AllowByDefault); _typographics = new HtmlTypographerSettings(); }
private static XmlReader CreateHtmlReader(TextReader reader, HtmlFilterSettings settings) { SgmlReader sgml = new SgmlReader(); sgml.DocType = "html"; sgml.WhitespaceHandling = (settings.PreserveWhitespace) ? WhitespaceHandling.All : WhitespaceHandling.None; sgml.CaseFolding = CaseFolding.ToLower; sgml.InputStream = reader; return sgml; }
/// <summary> /// Initializes a new instance of the /// <see cref="Radischevo.Wahha.Web.Text.HtmlProcessor"/> class. /// </summary> public HtmlProcessor() { _filter = new HtmlFilterSettings( HtmlFilteringMode.AllowByDefault); _typographics = new HtmlTypographerSettings(); }