Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Probable bug - can't output a CDATA tag
JonathonG
All,
I can't file a formal bug report on this (long story with my current customer, don't ask), but maybe someone else will be willing to file it.
I have a need to have a <![CDATA[ tag output in the final results of a presentation template. After much consternation, I boiled the issue down to the following PT (note: it uses no DCRs so you should be able to use it in place of any PT):
<iw_pt/>
<iw_perl>
my $cdata_start = '<![CDATA[';
my $cdata_end = ']]>';
iwpt_output("Here is cdata start: $cdata_start and here is cdata end: $cdata_end");
</iw_perl>
The ouput file will contain the following:
Here is cdata start: and here is cdata end:
Here's the workaround (but IMHO its pretty ugly):
<iw_pt/>
<iw_perl>
my $cdata_start = '<![CDATA' . '[';
my $cdata_end = ']]' . '>';
iwpt_output("Here is cdata start: $cdata_start and here is cdata end: $cdata_end");
</iw_perl>
The ouput file will now contain the following:
Here is cdata start: <![CDATA[ and here is cdata end: ]]>
Basically, the workaround is to make the text not actually look like a cdata tag.
So, it would appear that something in the PT engine is stripping out all opening and closing CDATA tags before doing anything else. This is not right. I can (maybe) understand that if I put a CDATA tag in my output stream that it will not be there...but it shouldn't mess with things inside of iw_perl tags.
This is mostly an FYI, but if some kindly soul could file it as a bug, I'd appreciate it. (Of course, with such a simple workaround, and very few interested customers, it probably will never get fixed, but at least its on record somewhere).
Jonathon
Independent Interwoven Contractor
Find more posts tagged with
Comments
Sri
Hi,
I just filed a bug report for this. Here is the bug number: 54050
Sri
JonathonG
Thanks Sri. I was beginning to wonder if anyone had noticed my lonely little post
Jonathon
Independent Interwoven Contractor
nipper
noticed, yes,
cared, not really
JonathonG
But now you do care...how touching
Jonathon
Independent Interwoven Contractor