Chartjs-Problem in displaying Persian language letters in chartjs in .net core

0👍

The HTML encoding engine will only safelist the basic latin alphabet,to widen the characters treated as safe by the encoder, try to add below code to your Program.cs:

builder.Services.AddSingleton<HtmlEncoder>(HtmlEncoder.Create(allowedRanges: new[] { UnicodeRanges.BasicLatin, UnicodeRanges.Arabic }));

result:
enter image description here

Leave a comment