Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON Response Special Character converted to entity code in html

I'm returning a JSON response from the server as

{"title":"St. Patrick's Day"}

On the front end its being converted to a special character as

St Patrick's Day

Does anyone have any idea as to how to convert it back. I'm using full calendar.

like image 692
Amit Nandan Periyapatna Avatar asked Jan 23 '26 01:01

Amit Nandan Periyapatna


1 Answers

The problem with Full Calendar is that it does not insert the code as html code but as val() so we will have to use the eventRender property and insert the title as a html:

eventRender: function(event,element){
  element.find('fc-event title').html(event.title);
}

After this code is written, the values get inserted as html elements and not as apecial chars.

like image 95
Amit Nandan Periyapatna Avatar answered Jan 24 '26 18:01

Amit Nandan Periyapatna



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!