extentreports-csharp icon indicating copy to clipboard operation
extentreports-csharp copied to clipboard

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

Open samchughtai opened this issue 4 years ago • 2 comments

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

samchughtai avatar Jan 29 '21 15:01 samchughtai

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 avatar Feb 24 '21 10:02 namilkimfree

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

namilkimfree avatar Mar 01 '21 16:03 namilkimfree