Template::sanitizeName()
Sanitizes a template name to prevent path traversal, as the name is used to build the content file name; dots are kept for representations, but slashes are removed; can return an empty string, it's up to the caller to decide whether to fall back to a default template name
Template::sanitizeName(string|null $name): string
Parameters
| Name | Type | Default |
|---|---|---|
| $name | stringornull |
no default value |
Return type
string
Parent class
Kirby\Panel\Lab\Template
inherited from Kirby\Template\Template