Vulnerability in EPiServer.Forms
We are hosting three websites in EpiServer CMS.
Each site has a page we wish to link to in the same relative position.
We are sharing a block amongst all three sites with an XHTMLString control on it. In the XHtmlString we have a link which points to the page for that site.
The trouble is that if we go to another site and hit the link in the shared block it will direct to the other site where the link was set up.
Is there any mechanism in EpiServer to use an XHtmlString with a link and have that link point to the relative page under each site? We are trying not to create three blocks, one for each site. Is there another way to do this without blocks? Unfortunately the link is surrounded by content so an XHtmlString is the best option for us.
I'd appreciate any ideas.
Is the link pointing to the page that exists only in that target site?
It is...and I know that is the problem. I was wondering if an XhtmlString link could point to a relative url under the site for all sites in our solution. All sites will have separate copies of the page but with the same relative location in all sites.
I think that's by design - to point to reference of the page instead of the address of the page. this makes it possible to survive page movements in the tree - address of the link changes as well.
Hi, the problem I assume is that XhtmlString on publish changes the url
and there for makes it point to the item 5532 on that site.
I haven't found any solution for that...
And if you then use the XhtmlString out of http context, for example email, its changing to /link/someguid.aspx
Im interested in solving this one... =)
I've not tried it on recent versions but I wrote about how to automatically convert external links into internal ones automatically some time ago for Episerver 5:
I know automatically converting external to internal links was added in Episerver 7 or 8 if memory serves me right. There may be a way of using what I previously wrote to reverse the built in logic and make internal links relative (it would be nice to selectively apply this though as you would not want this applied to all links in the rich text editor!).