Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#11603 closed enhancement (wontfix)

Ensure that oEmbed returns XHTML valid code

Reported by: hpguru's profile hpguru Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Validation Keywords: dev-feedback 2nd-opinion
Focuses: Cc:

Description

Works well but no XHTML valid auto video support. Please make it xhtml valid. :)

Attachments (1)

wpvideo.jpg (175.2 KB) - added by hpguru 15 years ago.
XHTML Validator

Download all attachments as: .zip

Change History (16)

#1 follow-up: @miqrogroove
15 years ago

  • Keywords reporter-feedback added; Video removed

hpguru, your bug report needs to contain a description of the problem. What isn't valid? How can we reproduce the problem on our own blogs?

@hpguru
15 years ago

XHTML Validator

#2 in reply to: ↑ 1 @hpguru
15 years ago

Replying to miqrogroove:

hpguru, your bug report needs to contain a description of the problem. What isn't valid? How can we reproduce the problem on our own blogs?

I add a screenshot.

#3 @hpguru
15 years ago

"Easier video embeds that allow you to just paste a URL on its own line and have it magically turn it into the proper embed code, with Oembed support for YouTube, Daily Motion, Blip.tv, Flickr, Hulu, Viddler, Qik, Revision3, Scribd, Google Video, Photobucket, PollDaddy, and WordPress.tv (and more in the next release)."

Broken my site XHTML with 7 errors.

#4 @miqrogroove
15 years ago

So that screenshot shows the code you embedded from youtube.com. What would you like WordPress to do differently?

#5 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Validation
  • Keywords reporter-feedback removed
  • Milestone changed from 2.9.1 to 3.0
  • Priority changed from high to normal
  • Type changed from defect (bug) to enhancement

he's complaining that the code returned by YouTube isn't XHTML valid. suggesting wontfix.

@hpguru: please complain to YouTube, and ask them to add a wmode=transparent parameter while they're at it.

#6 @Denis-de-Bernardy
15 years ago

  • Summary changed from New automated video support to Ensure that oEmbed returns XHTML valid code

#7 follow-up: @miqrogroove
15 years ago

suggesting wontfix.

I can imagine the next ticket, "Please block embedded advertising / cookies / videos that have been deleted / what have you."

#8 @hpguru
15 years ago

WordPress has WPvideo plugin that add valid YouTube videos. I think that is possible in WP own oEmbed. But i like how oEmbed work. Looks great that options are xhtml valid in 3.0 WP.

#9 in reply to: ↑ 7 @hpguru
15 years ago

Replying to miqrogroove:

suggesting wontfix.

I can imagine the next ticket, "Please block embedded advertising / cookies / videos that have been deleted / what have you."

No. I think that XHTML valid code is WordPress PROMISE. Wordpress is XHTML VALID. So, i think that oEmbed feature would be a valid to, is what software to use permit. :)

#10 @hpguru
15 years ago

  • Keywords oEmbed added

#11 @miqrogroove
15 years ago

If you want valid XHTML then don't use oEmbed. C'mon. The entire premise of this feature is to allow 3rd-parties to XSS your website. If it's not YouTube causing the problem it will be any of the other whitelisted providers eventually.

#12 @dd32
15 years ago

  • Keywords needs-patch added; oEmbed removed

The issue at heart here, Is that your doctype does not allow the usage of <embed> which is required for older non-XHTML compliant browsers.

In an environment where you're using XHTML, you'll probably need to filter out the non-compliant elements, as oEmbed is designed to use the trusted code from the embedder. And its unlikely WordPress is going to mess with the results, because removing embed means removing support for older browsers (No idea which browsers..)

In your case, something like this (untested) will achieve it:

add_filter('oembed_dataparse', '_strip_embed');
function _strip_embed($data) {
    $data = preg_replace('|<embed.+?>.*?</embed>|i', '', $data);
    return $data;
}

#13 @dd32
15 years ago

  • Keywords dev-feedback 2nd-opinion added; needs-patch removed

#14 @Denis-de-Bernardy
15 years ago

  • Milestone 3.0 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

looks like everyone is agreeing this ticket should be closed. @hpguru: don't use oembed. (or use dd32's function)

#15 @sirzooro
15 years ago

@hpguru: you can also take a look on Tidy - it should always return valid XHTML.

Note: See TracTickets for help on using tickets.