Legacy Knowledge Base
Published Jun. 30, 2025

Link doesn't work in Knowledge base when a non-standard protocol is chosen.

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.

Issue

  • When adding the notes:// protocol to a link in Knowledge Base, AntiSamy removes it and displays it as text.

Environment

  • Liferay DXP 7.2, 7.3

Resolution

By default, everything is sanitized by AntiSamy, with 3 exceptions (JournalArticle, BlogsEntry and FragmentEntry). 

Knowledge base is not among those exceptions so all your content will be sanitized by AntiSamy, which detects <other> protocols as insecure and removes them to avoid security problems.

  • There are two different options:
    • Whitelist: AntiSamy uses a whitelist, so it can define subsets of entities that should not be disinfected, preventing content of that type from being filtered.
    • Sanitizer-configuration.xml: A less restrictive option would be to add the desired protocol to the Sanitizer-configuration.xml file. In this way, AntiSamy will still perform the cleaning but will accept the added protocol as valid. 

      • To add the required protocol, the regular expression that allows filtering of external URLs <regexp name="offsiteURL"> must be modified. 
      • You can change this regular expression following the steps detailed in the following document, How to configure validation directives in AntiSamy.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base