This section is for Advanced Developers. Knowledge of the Regular Expressions is a prerequisite.
CuteEditor has taken steps into Template File management. A new and innovative capability is to allow advanced developers to build the Template File Name Filter. Once a filter has been set, only templates with names that comply with the filter, will be displayed in the template dialog and will be allowed to be uploaded to the server. The other templates are "filtered out".
To setup a filter, you need to be familiar with Regular Expression. Regular Expressions are advanced forms of wildcards and allow you to set fitlers precisely.
CuteEditor defines the following template name filter by default:
^[a-zA-Z0-9\._-]+$
But you can modify it to meet your own requirements using the following methods:
The security policy file (default.config, admin.config and guest.config) can be found in the /CuteEditor/Configuration/Security folder. In security policy file you can find the filenamePattern element. By default, it contains the following value:
<security name ="filenamePattern">^[a-zA-Z0-9\._-]+$</security>
You can modify the filenamePattern element to meet your own requirements.
For example:
<security name ="filenamePattern">^[a-zA-Z0-9\._-]+$</security>
C# Example:
Editor1.Setting["security:filenamePattern"]= "^[a-zA-Z0-9\._-]+$";
VB Example:
Editor1.Setting("security:filenamePattern")= "^[a-zA-Z0-9\._-]+$"