ColdFusion 8 adding unwanted text when calling a function.
Hi,
I'm trying to create an ics file by calling a function but ColdFusion 8 is adding extra code "
<link rel="Shortcut Icon" href="/favicon.ico">" on the beginning of the ics file. Can anybody show me to to avoid Coldfusion 8 adding this extra code?
here's the sample code that I am trying.
<cfscript>
stEvent = StructNew();
stEvent.description = "This can come from a file or other variable";
stEvent.subject = "A vCal created with the vCal UDF";
stEvent.location = "Chicago, IL";
stEvent.startTime = '#Dateformat(Now(), 'mmmm dd, yyyy') & " " & Timeformat(Now(), 'hh:mm tt')#'; //dateObj or timestamp in GMT
stEvent.endTime = '#Dateformat(Now(), 'mmmm dd, yyyy') & " " & Timeformat(Now(), 'hh:mm tt')#'; // dateObj or timestamp in GMT
stEvent.priority = 1;
vCalOutput = iCal(stEvent);
</cfscript>
<cfcontent type="text/calendar" reset="Yes">
<cfheader name="Content-Disposition" value="inline; filename=newAppointment.vcs"><cfoutput>#iCal(stEvent)#</cfoutput>
This is the output file that I am getting that makes it invalid calendar file due to extra code that being generated.
<link rel="Shortcut Icon" href="/favicon.ico">BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VEVENT
CLASS:PUBLIC
CREATED:20100415T105337Z
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:This can come from a file or other variable
DTEND:20100415T105300Z
DTSTAMP:20100415T105337Z
DTSTART:20100415T105300Z
LOCATION:Chicago, IL
PRIORITY:1
SEQUENCE:0
SUMMARY;ENCODING=QUOTED-PRINTABLE:A vCal created with the vCal UDF
TRANSP:OPAQUE
UID:01F5FB8D-5056-B053-A9646F5CFC7DB1FB
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:2
BEGIN:VALARM
TRIGGER:-PT30M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
