legacy-knowledge-base
公開されました Jul. 2, 2025

written-by

Alfonso Crisci

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • ナレッジベース の記事を公開した後、 <video> のHTML5タグで埋め込まれた動画を含む新しいの記事を公開します。
    <video controls="" height="240" width="320"><source src="/documents/20142/0/file_example_MP4_480_1_5MG.mp4/b32bbabe-2df3-5229-7ca8-39e5dfd98fa5" type="video/mp4" /></video>
    記事には何も表示されず、タグも完全に削除されてしまいます。

環境

  • Liferay DXP 7.0+

解決

  • ナレッジベースポートレットの <video> HTML5タグのサニタイズを防ぐために、 com.liferay.nature.base.model.KBArticle クラスをホワイトリストに登録します。

    1) コントロールパネル > 構成 > システム設定 > セキュリティツール > AntiSamy Sanitizer に移動し、 com.liferay.knowledge.base.model.KBArticleのホワイトリストエントリを1つ追加します。
    2) 完了したら、Liferayサーバーを再起動します。
    3) 再起動後、以前に公開された記事を編集し、ソースを修正します。(または新しい記事を作成する)。
    <video controls="" height="240" width="320"><source src="/documents/20142/0/file_example_MP4_480_1_5MG.mp4/b32bbabe-2df3-5229-7ca8-39e5dfd98fa5" type="video/mp4" /></video>
    4)動画を再公開すると、表示されるようになります。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base