Protocol-relative javascript includes in XSLT
I'm not sure if this is an XSLT quirk or an actual bug, but if you use a protocol-relative include in an XSLT format:
<script src="//path.to.include.js"
type="text/javascript"></script>
The published page seems to lose one of its slashes:
<script src="/path.to.include.js"
type="text/javascript"></script>
Is the double-slash one of the characters referenced in this post that requires cascade:cdata tags and XSL comments surrounding it? I'm using Cascade 7.0.5.
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 21 Nov, 2012 02:11 PM
Hi Erik,
Thank you for reporting this behavior, we do have this recorded as a known defect in which Cascade is re-writing scheme(protocol)-relative URLS.
Feel free to track the progress of this issue using the link above to see if it has been resolved in a future release of Cascade.
In the meantime, you could either include the http(s) or, as you suggested, wrap the
<script>
tag in code comments to avoid the link rewriting.Please let me know if you have any questions.
Thanks
2 Posted by espanae on 21 Nov, 2012 04:27 PM
Thanks Ryan.
3 Posted by Ryan Griffith on 21 Nov, 2012 05:37 PM
Not a problem, Erik.
Have a great day!
Ryan Griffith closed this discussion on 21 Nov, 2012 05:37 PM.