Re: Issue 4 in oohembed: Wordpress responses are incorrectly escaped

1 view
Skip to first unread message

Craig Andrews

unread,
Sep 5, 2009, 12:12:41 AM9/5/09
to oohe...@googlegroups.com
>
> Comment #4 on issue 4 by deepak.sarda: Wordpress responses are incorrectly
> escaped
> http://code.google.com/p/oohembed/issues/detail?id=4
>
>>> the title is text - not HTML, so it should not have HTML entities in
>>> it.
>
> So out of the context of HTML, who's to say that – is a HTML entity
> and not
> just funny looking text? Why are you assuming that oembed responses will
> be
> used
> exclusively in the context of rendering HTML documents?

I'm not - I believe you misinterpreted my statement. Oohembed is presently
returning titles that have HTML entities in them, so it is oohembed that
is assuming that oembed responses are used exclusives in the context of
HTML.

> In any case, the HTML spec itself says that TITLE should be text but
> entities are
> allowed.

Right, no dispute there. I'm talking about the oembed title specification,
which indicates text, not HTML.

> Further, how do you propose handling cases like this? Should I just strip
> the
> entities out? That may actually leave the title meaningless. Or should I
> maintain
> some kind of conversion table and try converting every entity encountered
> into
> suitable unicode?

You should convert the HTML entities encountered in the HTML <title> into
unicode for the oembed title. For example, in PHP, there is the
html_entities_decode
http://us2.php.net/manual/en/function.html-entity-decode.php function
which takes a string that has HTML entities in it and converts those
entities into their unicode equivalents.

> I still think you should just take the suggestion in the link I provided
> in
> the
> previous comment.
I think I am handling it correctly now. The oembed spec says that the
title property is text, and I display it as such. It does not say the
title property is HTML.

Thanks,
~Craig


Deepak Sarda

unread,
Sep 8, 2009, 8:00:34 PM9/8/09
to oohEmbed
When I said 'bring it up on the list', I meant the oembed spec
discussion list :-)

Sorry for the miscommunication but I feel that you and I disagree on
the spec interpretation and hence the oembed list is a better venue to
hash it out. The reason I brought up the HTML Title tag spec is
because I feel oembed should mirror that.

Cheers,
Deepak.
Reply all
Reply to author
Forward
0 new messages