File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,15 @@ namespace AventStack.ExtentReports.Model
5
5
[ Serializable ]
6
6
public class ScreenCapture : Media
7
7
{
8
+ private const string Base64StringDataType = "data:image/png;base64," ;
9
+
8
10
public string Source
9
11
{
10
12
get
11
13
{
12
14
if ( ! string . IsNullOrEmpty ( Base64String ) )
13
15
{
14
- return "<a href='data:image/png;base64," + Base64String + "' data-featherlight='image'><span class='label grey badge white-text text-white'>base64-img</span></a>" ;
16
+ return "<a href='" + Base64StringDataType + Base64String + "' data-featherlight='image'><span class='label grey badge white-text text-white'>base64-img</span></a>" ;
15
17
}
16
18
17
19
return "<img class='r-img' onerror='this.style.display=\" none\" ' data-featherlight='" + Path + "' src='" + Path + "' data-src='" + Path + "'>" ;
@@ -24,7 +26,7 @@ public string SourceIcon
24
26
{
25
27
if ( ! string . IsNullOrEmpty ( Base64String ) )
26
28
{
27
- return "<a href='data:image/png;base64," + Base64String + "' data-featherlight='image'><span class='label grey badge white-text text-white'>base64-img</span></a>" ;
29
+ return "<a href='" + Base64StringDataType + Base64String + "' data-featherlight='image'><span class='label grey badge white-text text-white'>base64-img</span></a>" ;
28
30
}
29
31
30
32
return "<a class='r-img' onerror='this.style.display=\" none\" ' data-featherlight='" + Path + "' href='" + Path + "' data-src='" + Path + "'>" +
@@ -37,7 +39,7 @@ public string ScreenCapturePath
37
39
{
38
40
get
39
41
{
40
- return ! string . IsNullOrEmpty ( base . Path ) ? base . Path : Base64String ;
42
+ return ! string . IsNullOrEmpty ( base . Path ) ? base . Path : Base64StringDataType + Base64String ;
41
43
}
42
44
}
43
45
You can’t perform that action at this time.
0 commit comments