extent-framework / extentreports-csharp

Extent Reporting Library, .NET
http://extentreports.com
Apache License 2.0
50 stars 40 forks source link

Node with name containing <> Text within <> is not showing #119

Open samchughtai opened 3 years ago

samchughtai commented 3 years ago

I am creating a node with text CreateNode("Search with Type: <All>"); In the report the text is Search with Type: Screenshot (25)

namilkimfree commented 3 years ago

In my opinion, it is the Razor Engin Enconding difference.

RawStringFactory(), and HtmlEncodedStringFactory()

When using RawStringFactory(), it was confirmed that <> is recognized as an html tag, When using HtmlEncodedStringFactory(), it was confirmed that <> is recognized as Text.

It is necessary so that the user can set it.

@samchughtai

namilkimfree commented 3 years ago

https://github.com/namilkimfree/extentreports-csharp fork version fixed issue.

nuget download path is https://www.nuget.org/packages/ExtentReports.BugFix/4.2.3

add EncodedStringFactory in ExtentHtmlReporter You can use EncodedStringFactory.HtmlEncodedStringFactory.

//Raw is default value
var htmlReporter = new ExtentHtmlReporter(Path.Combine(path),EncodedStringFactory.RawStringFactory); // Raw string ncoding. 
//you are use EncodedStringFactory.HtmlEncodedStringFactory 
var htmlReporter = new ExtentHtmlReporter(Path.Combine(path),EncodedStringFactory.HtmlEncodedStringFactory); //Html encoding