[opencms-dev] Protocol Relative URLs in html content

Richard Hardy rhardy5014 at aol.com
Thu Apr 10 14:43:58 CEST 2014


Hi,


We are using OpenCMS v 8.0.2 and have a problem using protocol relative URLs in img src attributes. See http://www.paulirish.com/2010/the-protocol-relative-url/


For example, if we enter the following in an html editor within OpenCMS:


<img src="//images.domain.com/folder/file.jpg/>


when we save the page and re-open it, the link is transformed to:



<img src="/folder/file.jpg/>



images.domain.com is a domain that is not, in any way, related to our OpenCMS instance.


We need to use protocol relative URLs as our page may be http or https and we need to host our images on another domain from the one managed in OpenCMS.


Is there any way, through configuration, that we can stop this happening? Failing that, can someone point us at the source code where this replacement may be happening, so that we can try to change this behaviour ourselves?


Thanks very much,


Richard Hardy.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140410/844d0dd3/attachment.htm>


More information about the opencms-dev mailing list