0
YouTube에서 간단한 오블 릭 URL을 파싱하고이를 xhtml로 변환하지만, 일부 html은 잘못되었다고 생각합니다. 유효한 xhtml은 allowFullScreen = "true"가 아니어야합니까 ????? 이것이 맞다면, 그렇게 할 수있는 깔끔한 모듈이 있습니까? 나는 "청정기"경로를 가야합니까?allowFullScreen과 같은 매개 변수를 사용하여 xhtml에 깔끔하게 정리하십시오.
무비로부터 입력 :
<iframe allowfullscreen ... ></iframe>
최종 출력 tidy'ing 후 :
<iframe allowfullscreen="" ...></iframe>
깔끔함 PHP :
$tidy = new \tidy();
$config = array(
'show-body-only' => true,
'char-encoding' => 'utf8'
);
$output = $tidy -> repairString($data['html'], $config, 'UTF8');