U4-10344 - Ampersands Confuse Umbraco's Property Aliasing Algorithm

Created by Nicholas Westby 22 Aug 2017, 16:36:30 Updated by Sebastiaan Janssen 02 Aug 2018, 08:56:21

Duplicates: U4-11550

When you edit a document type and add a new property, Umbraco automatically generates the alias based on the name you type for the property. However, if that name includes an ampersand, the algorithm seems to get confused and stops the alias so that it only includes the letters to the left of the ampersand:


The algorithm should simply exclude characters like ampersands when generating the alias (in the same way it excludes spaces). I don't know how it currently works, but I would expect it to have a whitelist of characters (e.g., alphanumerics and underscore), then discard all other characters (camel casing in the process).

2 Attachments


Bjarne Fyrstenborg 22 Aug 2017, 21:15:40

In my package Color Palettes I was inspired by this feature in core and added my own camelcase filter (as I remember there wasn't any reusable "camelcase" filter in core available at that time, so I added my own. https://github.com/bjarnef/color-palettes/blob/master/ColorPalettes/ColorPalettes/ColorPalettes/filters/camelcase.js

In my package I also wanted that, when the user starts modifying the alias and then going back to change name, it shouldn't overwrite alias - only first time.

E.g. "Terms & Conditions" become "termsConditions".

Sebastiaan Janssen 02 Aug 2018, 08:56:21

This was fixed along with fixing - http://issues.umbraco.org/issue/U4-11550

Priority: Normal

Type: Bug

State: Duplicate


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.4

Due in version:


Story Points: