Skip to content

Commit f5374c3

Browse files
authored
Update Htmlizer.cs
1 parent aaa27cb commit f5374c3

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/bunit.web/Rendering/Internal/Htmlizer.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ internal class Htmlizer
2121
};
2222

2323
private const string BLAZOR_INTERNAL_ATTR_PREFIX = "__internal_";
24-
2524
public const string BLAZOR_ATTR_PREFIX = "blazor:";
2625
public const string ELEMENT_REFERENCE_ATTR_NAME = BLAZOR_ATTR_PREFIX + "elementreference";
2726

@@ -216,16 +215,22 @@ private static int RenderAttributes(
216215
// to the following to make it more obvious
217216
// that this is a generated/special blazor attribute
218217
// used for tracking event handler id's
219-
result.Add($" {BLAZOR_ATTR_PREFIX}{frame.AttributeName}=\"{frame.AttributeEventHandlerId}\"");
218+
result.Add(" ");
219+
result.Add(BLAZOR_ATTR_PREFIX);
220+
result.Add(frame.AttributeName);
221+
result.Add("=");
222+
result.Add("\"");
223+
result.Add(frame.AttributeEventHandlerId);
224+
result.Add("\"");
220225
continue;
221226
}
222227

223228
switch (frame.AttributeValue)
224229
{
225230
case bool flag when flag && frame.AttributeName.StartsWith(BLAZOR_INTERNAL_ATTR_PREFIX, StringComparison.Ordinal):
226231
// NOTE: This was added to make it more obvious
227-
// that this is a generated/special blazor attribute
228-
// for internal usage
232+
// that this is a generated/special blazor attribute
233+
// for internal usage
229234
result.Add(" ");
230235
result.Add(BLAZOR_ATTR_PREFIX);
231236
result.Add(frame.AttributeName);

0 commit comments

Comments
 (0)