Liferay Support does not recommend or endorse specific third-party products over others. Liferay is not responsible for any instructions herein or referenced regarding these products. Any implementation of these principles is the responsibility of the subscriber.
This article is a legacy article. It applies to previous versions of the Liferay product. While the article is no longer maintained, the information may still be applicable.
While Liferay will allow some special characters like " " (whitespace) or "$" (dollar) in Tags, others like "&" (ampersand) or "*" (askterisk) cannot be used and will result with an error message. "One of your fields contains invalid characters"
Resolution
The reason these special characters aren't allowed is that they may interfere with indexing or queries. Here are the relevant lines of code:
6.0.x Build: com.liferay.portlet.asset.util.AssetUtil.java
public static char[] INVALID_CHARACTERS = new char[] { CharPool.AMPERSAND, CharPool.APOSTROPHE, CharPool.AT, CharPool.BACK_SLASH, CharPool.CLOSE_BRACKET, CharPool.CLOSE_CURLY_BRACE, CharPool.COLON, CharPool.COMMA, CharPool.EQUAL, CharPool.GREATER_THAN, CharPool.FORWARD_SLASH, CharPool.LESS_THAN, CharPool.NEW_LINE, CharPool.OPEN_BRACKET, CharPool.OPEN_CURLY_BRACE, CharPool.PERCENT, CharPool.PIPE, CharPool.PLUS, CharPool.POUND, CharPool.QUESTION, CharPool.QUOTE, CharPool.RETURN, CharPool.SEMICOLON, CharPool.SLASH, CharPool.STAR, CharPool.TILDE };
public static final char[] INVALID_CHARACTERS = new char[] { CharPool.AMPERSAND, CharPool.APOSTROPHE, CharPool.AT, CharPool.BACK_SLASH, CharPool.CLOSE_BRACKET, CharPool.CLOSE_CURLY_BRACE, CharPool.COLON, CharPool.COMMA, CharPool.EQUAL, CharPool.GREATER_THAN, CharPool.FORWARD_SLASH, CharPool.LESS_THAN, CharPool.NEW_LINE, CharPool.OPEN_BRACKET, CharPool.OPEN_CURLY_BRACE, CharPool.PERCENT, CharPool.PIPE, CharPool.PLUS, CharPool.POUND, CharPool.QUESTION, CharPool.QUOTE, CharPool.RETURN, CharPool.SEMICOLON, CharPool.SLASH, CharPool.STAR, CharPool.TILDE }TILDE };