IDE-886

Make sure it only works with the sole ending %
IDE-931

modified the null project portlet creation bug in ticket IDE-931