when i try to store things in the cms, i sometimes have

Caused by: java.lang.IllegalArgumentException: Illegal content object name <té.txt>

Is there a list of illegal character for the name of the node in the cms ?

asked 19.02.2015 at 17:10

dbalasse's gravatar image

dbalasse
(suspended)
accept rate: 25%


The name of a Content Object is checked by a Regular Expression: [\\p{Alnum}_-]+[\\p{Alnum}_.+\\-]*

Here an example of an utility class

package cms.utils;

import java.util.regex.Pattern;

public class CmsUtils {

    private CmsUtils(){}

    private static final Pattern CMS_NAME_FORMAT = Pattern.compile("[\\p{Alnum}_-]+[\\p{Alnum}_.+\\-]*");

    public static boolean isContentObjectNameValid(String name) {
        return CMS_NAME_FORMAT.matcher(name).matches();
    }
}
link

answered 19.02.2015 at 17:22

Flavio%20Sadeghi's gravatar image

Flavio Sadeghi ♦♦
(suspended)
accept rate: 75%

edited 20.02.2015 at 08:56

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×26

Asked: 19.02.2015 at 17:10

Seen: 2,035 times

Last updated: 20.02.2015 at 08:56