Legacy Knowledge Base
Published Jun. 30, 2025

Spaces are removed from the translation when it is longer than 75 characters

Written By

Balázs Létai

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

  • Language Override translation values have removed space when they are longer then 75 characters
  • Steps to reproduce:
    • Control Panel > Language overrides, add a new key, name it e.g. testing-translation
    • Add any value longer then 75 chars to any language
      e.g. "test test test test test test test test test test test test test test test t"
    • Save it and check it again
  • Actual result: 
    • When the value is longer than 75 characters, some spaces are removed from the text (the above example is 76 chars)

Screenshot_2023-05-03_at_8.18.02.png

Environment

  • Liferay DXP 7.4 U4+

Resolution

  •  Whitelisting
    com.liferay.portal.language.override.model.PLOEntry
    in Control Panel -> System Settings -> Security Tools -> AntiSamy Sanitizer solves the issue.
  • Please make sure that after adding com.liferay.portal.language.override.model.PLOEntry to the white list of AntiSamy Sanitizer, you save the changes and in the affected keys you set the correct values.
    The above whitelisting would not change back the modified values which already have the spaces removed before this configuration change.

Screenshot_2023-04-11_at_10.11.19.png

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base