[EventCalendar] ec3_get_events() not translating ampersands into
character entities
Dr. Peter Troxler
peter.troxler at gmx.net
Thu Oct 11 06:27:42 UTC 2007
ejm
reading through your email again I started wondering:
why isn't there a ; after the & in the first place ???
(this is exactly what the error message is telling us: reference not
terminated by REFC delimiter.)
so we are looking in the wrong place to fix something that cannot be
fixed that way.
you need to find out where this wrongly encoded & comes from (maybe a
manual entry?)
/ pt
On 10-okt-2007, at 21:24, ejm wrote:
> Thank you for your reply, P; but unfortunately, the result with using
>
> htmlentities(html_entity_decode($calendar_days[$day_id]->get_titles
> ()))
>
> is:
>
> &amp
>
> very similar to what happens with
> wp_specialchars($calendar_days[$day_id]->get_titles())
>
> -ejm
>
> On Wed, 10 Oct 2007 20:27:16 +0200, "Dr. Peter Troxler"
> <peter.troxler at gmx.net> wrote:
>
>> have you tried this
>>
>> htmlentities(html_entity_decode($calendar_days[$day_id]->get_titles
>> ());
>>
>> this essentially converts all html (that might eventually be sitting
>> there) to normal characters and converts them back to valid html
>>
>> / pt
>>
>> On 10-okt-2007, at 18:44, ejm wrote:
>>
>>> Thank you for your reply, JD;
>>>
>>>> Find
>>>> $calendar_days[$day_id]->get_titles()
>>>>
>>>> Replace it with
>>>> wp_specialchars($calendar_days[$day_id]->get_titles())
>>>
>>> Alas, I thought I had mentioned that I have already tried this
>>> (it was
>>> actually the first thing I tried). All that happens is that it
>>> translates any ampersand that is there in the title spec to produce:
>>>
>>> &amp
>>>
>>> instead of the other incorrect version that is there now:
>>>
>>> &
>>>
>>> Rats. Any other ideas??
>>>
>>> -ejm
>>>
>>> On Wed, 10 Oct 2007 09:43:13 -0400, "JD Puglisi" wrote:
>>>> OK...one more for you to try. Let's filter the title call in the
>>>> calendar.
>>>>
>>>> In template-functions.php, (around line 234
>>>> Find
>>>> $calendar_days[$day_id]->get_titles()
>>>>
>>>> Replace it with
>>>> wp_specialchars($calendar_days[$day_id]->get_titles())
>>>>
>>>> ------------------------
>>>> I have now added your suggested fix. The page loads without visible
>>>> error messages but alas, the same validation errors persist.
>>>> Here is
>>>> just one of the error messages:
>>>>
>>>> ---validator.w3.org---
>>>> Line 704, Column 197: reference not terminated by REFC delimiter.
>>>>
>>>
>>>
>>> _______________________________________________
>>> Blog: http://wpcal.firetree.net/
>>> EventCalendar at firetree.net mailing list
>>> Unsubscribe: http://penguin.firetree.net/eventcalendar
>>
>>
>> _______________________________________________
>> Blog: http://wpcal.firetree.net/
>> EventCalendar at firetree.net mailing list
>> Unsubscribe: http://penguin.firetree.net/eventcalendar
>
>
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar
More information about the EventCalendar
mailing list