jamietre / CsQuery

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4.
Other
1.15k stars 249 forks source link

Render adds internals properties of CQ to the render output #92

Closed vitallium closed 11 years ago

vitallium commented 11 years ago

Summary: If you set CsQueryConfig.HtmlParsingOptions to HtmlParsingOptions.None, calling Render will add some type values to the output.

Working example (for LinqPad):

CsQueryConfig config = new CsQueryConfig();
    config.HtmlParsingOptions = HtmlParsingOptions.None;
    var dom = CQ.Create("<div><p>test</p><p></p><p></p></div><p>test2<p>test3<p></p>", config);
    dom.Render().Dump();

Output (stripped):

<div domindexprovider="CsQuery.RangedDomIndexProvider" 
domrenderingoptions="QuoteAllAttributes" htmlparsingoptions="None" htmlencoder="CsQuery.Output.HtmlEncoderBasic" outputformatter="CsQuery.Output.FormatDefault" 
... etc.

Version: 1.3.5.69 (latest from distribution)

Is this normal behaviour?

vitallium commented 11 years ago

Never mind. Invalid. I didn't see the correct signature for Create method.