xpressengine / xe-core

XpressEngine 1.x
https://xe1.xpressengine.com
Other
89 stars 62 forks source link

에디터에서 작성된 video 태그 등이 사라닙니다. #2420

Closed wookho closed 4 years ago

wookho commented 4 years ago

https://github.com/xpressengine/xe-core/issues/1882

과거 이슈 처리가 안된 것 같네요.

wookho commented 4 years ago

검색을 통해서 /classes/security/Purifier.class.php 파일의 private function _setDefinition(&$content) 에 아래를 추가하고 일단 임시 조치 했습니다.

$this->_def->addElement('video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', array( 'src' => 'URI', 'type' => 'Text', 'width' => 'Length', 'height' => 'Length', 'poster' => 'URI', 'preload' => 'Enum#auto,metadata,none', 'controls' => 'Bool', 'muted' => 'Bool', 'autoplay' => 'Bool', 'playsinline' => 'Bool', 'loop' => 'Bool' )); $this->_def->addElement('source', 'Block', 'Flow', 'Common', array( 'src' => 'URI', 'type' => 'Text', ));

Lastorder-DC commented 4 years ago

1882번 이슈는 관리자 회원의 글 작성시 필터링이 적용되던 문제점이 수정된 것으로 video 태그가 삭제되는 문제점과는 무관합니다. video 태그가 삭제되는 것은 XE에 내장된 HTMLPurifier 버전이 낮아 html5 태그를 인식하지 못하는 문제 때문으로, 이미 #1800 #1804 에서 HTMLPurifier 버전업에 대해 다루었으나 현재 close되어 있습니다.

wookho commented 4 years ago

관리자권한으로도 필터링 되는 잇 였던거네요. html5 태그 대응을 아직도 못하고 있는건 이제라도 조치가 되면 좋겠네요.