Skip to content

Commit

Permalink
LPS-92643 Encode friendly url to support special characters when reso…
Browse files Browse the repository at this point in the history
…lving asset dispaly page url
  • Loading branch information
pavel-savinov committed Apr 22, 2019
1 parent a92c818 commit 3731136
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -35,6 +35,7 @@
import com.liferay.portal.kernel.portlet.FriendlyURLResolver;
import com.liferay.portal.kernel.service.LayoutLocalService;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.Http;
import com.liferay.portal.kernel.util.Portal;
import com.liferay.portal.kernel.util.WebKeys;

Expand Down Expand Up @@ -135,6 +136,9 @@ public LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(
@Reference
protected AssetHelper assetHelper;

@Reference
protected Http http;

@Reference
protected InfoDisplayContributorTracker infoDisplayContributorTracker;

Expand Down Expand Up @@ -221,7 +225,7 @@ private String _getInfoURLSeparator(String friendlyURL) {
private String _getUrlTitle(String friendlyURL) {
List<String> paths = StringUtil.split(friendlyURL, CharPool.SLASH);

return paths.get(1);
return http.encodePath(paths.get(1));
}

private long _getVersionClassPK(String friendlyURL) {
Expand Down

0 comments on commit 3731136

Please sign in to comment.