JorgeFerrer/liferay-portal — pull request #253 by KocsisDaniel (2013-09-30 14:10:02+00:00)
Title: LPS-40736 Normalize newly created staging URLs as well

Hi Jorge,

this is a small fix for sites contains only non-Alphanumeric characters on their name. The problem is we generate group friendly URL "-", "-1", "-2"... for these groups and when we creates the staging group for these we append "-staging" at the end of the original group friendly URL. For the first one the result is: "/--stgaing", however FriendlyURLServlet calls the GLSI.fetchFriendlyURLGroup() which calls a FriendlyURLNormalizerUtil.normalize(friendlyURL) before pass the friendlyURL param which result "/-staging". After checking the GLSI.getFriendlyURL(many params) I found we call the GLSI.getFriendlyURL(String friendlyURL) to force to normalize the produced string, so I implemented the same logic and re-factored the code to a new method.

cc'-ing: @matethurzo

thanks,
Daniel