-
when serializing for alternate desc, i have to do this
can this be fixed? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
How are you creating the var evt = calendar.Create<CalendarEvent>();
evt.AddProperty("X-ALT-DESC", "FMTTYPE=text/html:<html></html>"); If so, you get the point, rigth? |
Beta Was this translation helpful? Give feedback.
-
That is what I'm doing, but I guess I don't fully understand what the point is supposed to be. I was following this link and was under the assumption there would be some kind of fix eventually: https://stackoverflow.com/questions/41304898/how-do-i-create-an-html-formatted-ics-message-body-using-ical-net#:~:text=without%20any%20fuss.-,ical.net,bug%20with%20CalendarProperty%20serialization%2C%20but%20the%20workaround%20is%20just%20one%20line.,-const%20string%20formatted Maybe I'm confusing things but just looking to get some clarification. |
Beta Was this translation helpful? Give feedback.
-
Your adding a property with name "X-ALT-DESC", and a value of "FMTTYPE=text/html:". |
Beta Was this translation helpful? Give feedback.
Your adding a property with name "X-ALT-DESC", and a value of "FMTTYPE=text/html:".
When rendering the property to ics, you get
X-ALT-DESC:FMTTYPE=text/html:<html></html>
. The colon is the separator between the name and the value by RFC definition. The value goes there untouched.So the key is
evt.AddProperty("X-ALT-DESC;FMTTYPE=text/html", "html></html>");
This will render the expected
X-ALT-DESC;FMTTYPE=text/html:<html></html>