@marcusosterberg opened this Issue on January 9th 2023

Expected Behavior

I guess goal names / titles should accept a & character

Current Behavior

Everything after the "&" is scrapped when saving a goal.
My example:
2. Mikro: Klickar till etjänsten "Felanmälan&
When I try:
2. Mikro: Klickar till etjänsten "Felanmälan&syn"

Steps to Reproduce (for Bugs)

The demo environment do not allow me to enter goals.


I'm trying to have ampersands and other special characters in the name of a goal

Your Environment

  • Matomo Version: 4.13.0

  • PHP Version: 7.4.32

  • Server Operating System: Ubuntu LTS

  • Browser: Brave (Chromium)

  • Operating System: Macos 12.6.2

@sgiehl commented on January 9th 2023 Member

Hi @marcusosterberg,

The problem actually is not the ampersand. Goal names are limited to 50 chars. But special html chars like " or & are stored html encoded as " or &.
So goal names that reaches that limit (after encoding the html chars) are truncated to 50 chars. This currently might also break those encoded characters as they might get cut off.

I guess in general we should store those names unencoded in that database and ensure the name is encoded whereever it is used. Might be related or solvable with #11786

Powered by GitHub Issue Mirror