Says: replace punctuation symbols and blank spaces with the hyphen character ('-')
So does that mean that underscore is a punctuation symbol?
The problem is that the documentation also states: Some usage examples are: XP node name
I mostly use sanitize on the value of the _name property when doing node.create.
Last week @sigdestad (and I) found that it's allowed to make property names starting with underscore (this was told to @GlennRicaud). Similarly it's allowed to set a value for the _name property which starts with an underscore.
Thus lib-common.sanitize is more strict than what the node layer allows for...
As the description says, this sanitize for node names and not property names.
We could have a sanitization library with a method for each case of sanitization
The documentation: https://repo.enonic.com/public/com/enonic/xp/docs/7.0.2/docs-7.0.2-libdoc.zip!/module-common.html#.sanitize
Says: replace punctuation symbols and blank spaces with the hyphen character ('-')
So does that mean that underscore is a punctuation symbol?
The problem is that the documentation also states: Some usage examples are: XP node name
I mostly use sanitize on the value of the _name property when doing node.create.
Last week @sigdestad (and I) found that it's allowed to make property names starting with underscore (this was told to @GlennRicaud). Similarly it's allowed to set a value for the _name property which starts with an underscore.
Thus lib-common.sanitize is more strict than what the node layer allows for...