Scheduler Subject and Location HTML Encoding

Hello, 

The subject and location properties of the object I am displaying in the Blazor Scheduler can have html tags in them for formation.  The default behavior of the scheduler appears to be html encoding the text displayed for these fields.  Can this be disabled so my data is formatted correctly instead of displaying HTML tags? 

Image_1126_1707609830759



3 Replies

RR Ram Raju Elaiyaperumal Syncfusion Team February 12, 2024 03:33 PM UTC

Hi Bryan Luisana,


Thank you for reaching out to us with your query.


From your description, it appears that you are using HTML elements in the 'Location' field, which might be causing the issue you're experiencing. To resolve this, you can utilize the 'EventTemplate' event to customize the events.


Please refer to our documentation for more details on this: https://blazor.syncfusion.com/documentation/scheduler/appointment-customization#using-template


If you continue to face issues, we would appreciate if you could provide us with more information for further investigation:


Could you confirm if you are using HTML tags in the 'Location' field?

Could you share a simple sample that replicates your issue?


This will help us understand your issue better and provide you with a more accurate solution.


Regards,

Ram



BL Bryan Luisana February 13, 2024 02:32 PM UTC

Thanks Ram, 


Using the Template and then also adding (MarkupString) to all fields that contain html characters stopped them from being encoded and displayed as HTML tags.  This appears to me more of a "feature" of blazor than a part of the scheduler itself.  


Here is a simple working example for location. 


<Template>

    <div>Location: @((MarkupString)(context as AppointmentData).Location)</div>

</Template>




RR Ram Raju Elaiyaperumal Syncfusion Team February 14, 2024 07:02 AM UTC

Hi Bryan Luisana,

We’re glad to hear that you have found a solution! Your feedback is valuable and we appreciate you sharing your working example. This will certainly help others who might encounter a similar situation.

We're always looking to improve and your suggestion about considering this query in the future is noted. Thank you for bringing this to our attention.

Please don't hesitate to reach out if you have any more questions or need further assistance.

Regards,

Ram


Loader.
Up arrow icon