Protocol-relative javascript includes in XSLT

espanae's Avatar

espanae

20 Nov, 2012 10:09 PM

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.

  1. 1 Posted by Ryan Griffith on 21 Nov, 2012 02:11 PM

    Ryan Griffith's Avatar

    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. 2 Posted by espanae on 21 Nov, 2012 04:27 PM

    espanae's Avatar

    Thanks Ryan.

  3. 3 Posted by Ryan Griffith on 21 Nov, 2012 05:37 PM

    Ryan Griffith's Avatar

    Not a problem, Erik.

    Have a great day!

  4. Ryan Griffith closed this discussion on 21 Nov, 2012 05:37 PM.

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

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM