[EventCalendar] ec3_get_events() not translating ampersands into
character entities
ejm
cq547 at torfree.net
Fri Oct 5 16:25:31 UTC 2007
>Yet when you have...
>
>$data['TITLE'] =$data['TITLE'];
>
>...you see the titles but the special characters are not converted
>into entities?
No, sorry for the confusion. I have tried. The titles do not appear at
all with the above coding. There is just a blank. The titles only
appear with this coding (special characters not converted)
$data['TITLE'] =$entry->post_title;
and this coding (special characters converted):
$data['TITLE'] =htmlentities($data['TITLE']);
For more detail about this, please see
http://penguin.firetree.net/pipermail/eventcalendar/2007-October/002502.html
Thank you.
-ejm
On Fri, 5 Oct 2007 17:08:12 +0100, Alex Tingle <alex at firetree.net>
wrote:
>On 5 Oct 2007, at 16:56, ejm wrote:
>> I put the following:
>> $data['TITLE'] ='Subject: '.htmlentities($data['TITLE'],ENT_QUOTES);
>>
>> and what appeared was several instances of "Subject:" over and over
>> for each entry and no titles at all.
>
>You did check the HTML, rather than just looking at the rendered
>page, right?
>
>
>> When I tried the following:
>> $data['TITLE'] =htmlentities($data['TITLE']);
>>
>> No title at all appeared.
>
>Yet when you have...
>
>$data['TITLE'] =$data['TITLE'];
>
>...you see the titles but the special characters are not converted
>into entities?
>
>If that's the case, then I'm not sure I can help you. The htmlentities
>() function is a standard part of PHP - if it's not working then
>you've got bigger problems than a couple of validation errors.
>
>-Alex
More information about the EventCalendar
mailing list