0

I'm parsing simple oembed urls from youtube, and converting them to xhtml, however, some html gets tidy'd (I believe to be) incorrectly. Shouldn't the valid xhtml be allowFullScreen="true"????? If this is correct, is there some tidy module that will do that? I must I go the "purifier" route?

input from youtube:

<iframe allowfullscreen ... ></iframe>

final output after tidy'ing:

<iframe allowfullscreen="" ...></iframe>

PHP Tidy:

$tidy                   =  new \tidy();
$config             =  array(
    'show-body-only'   => true,
    'char-encoding'    => 'utf8'
);
$output = $tidy -> repairString($data['html'], $config, 'UTF8');
ansiart
  • 2,563
  • 2
  • 23
  • 41

1 Answers1

1

I'm not aware of any XHTML specification that defines an allowfullscreen attribute, which would explain why tidy isn't recognising it as a boolean attribute.

If it is a boolean attribute, then true would not be a valid value for it. The name and the value would be the same string.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335