start-code and end-code within quotes

Robert Whitaker's Avatar

Robert Whitaker

10 Feb, 2011 09:52 PM

I cannot seem to get start-code and end-code to work within quotes.

Example:

Cascade Post

. . . is rendered as . . .

Cascade Post

  1. 1 Posted by Robert Whitaker on 10 Feb, 2011 09:55 PM

    Robert Whitaker's Avatar

    Oops. . that did not display properly in the message.

    Basically any symbols between start-code and end-code are converted to ascii codes if the start-code and end-code are within quotes (" ").

  2. 2 Posted by Robert Whitaker on 10 Feb, 2011 10:09 PM

    Robert Whitaker's Avatar

    more...

    It seems to be only within html 'img' tags that this occurs.

  3. 3 Posted by Kris on 11 Feb, 2011 02:08 PM

    Kris's Avatar

    Robert,

    I believe the reason that does not work is because it is invalid XHTML which is required within Cascade. The workaround I have used is to echo the entire line like this:

    <!--#START-CODE
    <?php
        echo '<img alt="Cascade Post" id="print_logo" src="$HEADER_IMAGE" />';
    ?>
    #END-CODE-->`
    

    I know it's not ideal but that is the only way I have found to make it work.
    Kris

  4. 4 Posted by Ross on 18 Feb, 2011 08:33 PM

    Ross's Avatar

    Kris,

    That is the correct workaround. XHTML restrictions make it difficult to impossible to embed some characters into attribute values ("..."), so we recommend putting the entire element into an echo statement just like you have above.

  5. Ross closed this discussion on 18 Feb, 2011 08:33 PM.

Comments are currently closed for this discussion. You can start a new one.

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