Legacy Knowledge Base
公開されました Jun. 30, 2025

非標準のプロトコルを選択すると、ナレッジ ベースでリンクが機能しません。

Written By

María Picado

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • ナレッジ ベースのリンクに notes:// プロトコルを追加すると、 AntiSamy によって削除され、テキストとして表示されます。

Environment

  • ライフレイDXP 7.2、7.3

解決策

デフォルトでは、3 つの例外 (JournalArticle、BlogsEntry、および FragmentEntry) を除いて、すべてが AntiSamyによってサニタイズされます。

ナレッジ ベース はこれらの例外に含まれないため、すべてのコンテンツは AntiSamyによってサニタイズされ、 <other> プロトコルが安全でないものとして検出され、セキュリティ上の問題を回避するためにそれらが削除されます。

  • 次の 2 つのオプションがあります。
    • ホワイトリスト: AntiSamy はホワイトリストを使用するため、駆除してはならないエンティティのサブセットを定義し、そのタイプのコンテンツがフィルタリングされないようにします。
    • Sanitizer-configuration.xml: 制限の少ないオプションは、必要なプロトコルを Sanitizer-configuration.xml ファイルに追加することです。 このように、AntiSamy は引き続きクリーニングを実行しますが、追加されたプロトコルを有効なものとして受け入れます。

      • 必要なプロトコルを追加するには、外部 URL <regexp name="offsiteURL"> のフィルタリングを可能にする正規表現を変更する必要があります。
      • この正規表現は、次のドキュメントで説明されている手順に従って変更できます。 AntiSamy で検証ディレクティブを構成する方法。

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base