Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinkUtil.GetMediaUrl adds unnecessary slash when domain is set #2

Open
zzzzBov opened this issue Apr 3, 2013 · 0 comments
Open

LinkUtil.GetMediaUrl adds unnecessary slash when domain is set #2

zzzzBov opened this issue Apr 3, 2013 · 0 comments

Comments

@zzzzBov
Copy link

zzzzBov commented Apr 3, 2013

If the sitecore link manager has alwaysIncludeServerUrl set to true, MediaManager.GetMediaUrl(mediaItem) will return a link along the lines of:

http://sub.domain.tld/~/media/Images/path/...

LinkUtil.GetMediaUrl line 16 shows:

return Sitecore.StringUtil.EnsurePrefix('/', Sitecore.Resources.Media.MediaManager.GetMediaUrl(mediaItem));

which will convert the produced URL into:

/http://sub.domain.tld/~media/Images/path/...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant