5 Replies Latest reply on May 8, 2018 1:35 PM by Sanford Whiteman

    Marketo Image URL Encoding

    Stephen Baker

      Hi.

       

      Using Movable Ink and am at a wall. I'll get right to it.

       

      This works when pasted into an email template using the string output of the encoded date:

      http://www.movable-ink-6816.com/p/rp/0f114b2c0c7ed0b1.png?mi_u=12345&mi_date=May+8%2C+2018+9%3A48+AM

       

      This does not work, with token included that calculates the above string format, and actually breaks the template table layout (attached example of 600px table structure during render preview):

      http://www.movable-ink-6816.com/p/rp/0f114b2c0c7ed0b1.png?mi_u={{lead.Id}}&mi_date={{my.mi_dateTime}}

       

      Everything seems to function outside of trying to implement it within Marketo. They index the image after tokens process and things go south. Physical inbox previews are the same broken-ness. The moment you add mi_dateTime the HTML syntax is messed up (no idea why?). Attached screen grab.

       

      Does Marketo not support this use case? Or I don't understand part of the rendering stack.

       

      This is the mi_dateTime velocity:

      #set ( $a = $date.get('default','short' ) )
      #set ( $a = $esc.url($a) )
      $a##
      
      

       

      -sb

        • Re: Marketo Image URL Encoding
          Josh Hill

          Can you post all of the code?

           

          Did you ask Moveable Ink?

           

          How are your tokens formatted? Screenshot?

          • Re: Marketo Image URL Encoding
            Stephen Baker

            Lel. Nvm.

             

            It was ## in the velocity code.

             

            To this day don't understand why sometimes strings require that to not add whitespace characters and sometimes it breaks templates such as in this case.

              • Re: Marketo Image URL Encoding
                Sanford Whiteman

                To this day don't understand why sometimes strings require that to not add whitespace characters and sometimes it breaks templates such as in this case.

                Well, in this case if you didn't have a line break at the end of the token code, you didn't have anything in the token to escape. If you just end a token without hitting Enter, there's no trailing whitespace.

                1 of 1 people found this helpful
              • Re: Marketo Image URL Encoding
                Stephen Baker

                Makes sense.

                 

                I believe it's only if you add a break followed by velocity stuffs, so you're removing the newline character? I know I've had issues with it in the past with added spaces. Maybe I had a newline for some reason.

                 

                Is it expected that adding a comment in this fashion should mess with the HTML? It seems to comment out whatever gets attached.

                 

                I imagine something like this happens during the render: #your velocity doings stuff () () ##<html stuff is now commented out on this line>So it's no longer there</html stuff>

                  • Re: Marketo Image URL Encoding
                    Sanford Whiteman
                    I imagine something like this happens during the render: #your velocity doings stuff () () ##<html stuff is now commented out on this line>So it's no longer there</html stuff>

                    Exactly.

                     

                    Velocity (or rather Marketo's use of Velocity) is remarkably unencapsulated/greedy. If you don't have something to comment out within the token it will find something.

                    1 of 1 people found this helpful