All Relative imag paths being prefixed with an extra blackslash

Craig Hazard asked on May 14, 2015 13:47

Whenever I try and get a path to an image, Kentico(?) is putting an extra backslash infront of my URLs.

For example <%# Eval("ImageUrl") $> that would usually return "/App_Themes/images/blah.png" will return "//App_Themes/images/blah.png"

The same happens in Static HTML widgets, If i enter <img src="/App_Themes/images/blah.png" /> in the preview it will work, but as soon as I go to the page the markup has changed to <img src="//App_Themes/images/blah.png" /> the same happens if i try <img src="~/App_Themes/images/blah.png" />

Has anyone else run into this issue, or have any idea what could be causing it?

Not that this was not happening on my staging build, but has happened on my production server, and none of my other kentico sites on the production server are having this issue.

Thanks

-Craig

Recent Answers


Chantale Laberge answered on May 14, 2015 19:49

You should find what is causing the problem, but in the meantime you can try

((Eval("ImageUrl")).ToString()).Replace("//","/")

to get rid of those //

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.