veda-consulting-company / uk.co.vedaconsulting.mosaico

Other
39 stars 74 forks source link

"View in your browser" link generated when deleted and visibility set to user and admin #610

Open savionlee opened 1 year ago

savionlee commented 1 year ago

I liked having the unsubscribe up at the top with the preheader and the text to preview to clients. But this email wasn't going to be a public page. I thought since it was just hyperlinked text, I could delete it and we'd be good. But I got a notice about someone trying to access the "view in your browser" link after sending it out. In viewing source, it shows the link was still generated and an href tag was surrounding no text.

Steps to Reproduce:

  1. Delete text view in your browser
  2. Set visibility to user & admins under advanced options
  3. send email
  4. examine source

Expected Behavior

No link is generated.

here's an excerpt of the plain text part of the email


        Unsubscribe [1]

         [2]

        RSVP for (Some Date)
...(body content)

[1] /https://domain.com/civicrm/?civiwp=CiviCRM&q=civicrm%2Fmailing%2Funsubscribe&reset=1&jid=169&qid=1577&h=<random numbers>
[2] /https://domain.com/civicrm/?civiwp=CiviCRM&q=civicrm%2Fmailing%2Fview&reset=1&id=33169d0e63f28a7c&cid=206&cs=<random numbers and underscores>

here's the pre header block in the html version of the email:

    <!-- preheaderBlock -->
    <table role="presentation" class="vb-outer" width="100%" cellpadding="0" border="0" cellspacing="0" bgcolor="#3f3f3f" id="ko_preheaderBlock_1" style="background-color: #3f3f3f">
      <tbody><tr><td class="vb-outer" align="center" valign="top" style="padding-left: 9px; padding-right: 9px; font-size: 0">
      <div style="font-size: 1px; line-height: 1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden">RSVP for the Planning Meeting</div>
      <!--[if (gte mso 9)|(lte ie 8)]><table role="presentation" align="center" border="0" cellspacing="0" cellpadding="0" width="570"><tr><td align="center" valign="top"><![endif]--><!--
      --><div style="margin: 0 auto; max-width: 570px; -mru-width: 0px"><table role="presentation" class="vb-row" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 100%; max-width: 570px; -mru-width: 0px" width="570">

        <tbody><tr>
      <td align="center" valign="top" style="font-size: 0; padding: 0 9px; padding-top: 4px; padding-bottom: 4px"><div style="width: 100%; max-width: 552px; -mru-width: 0px"><!--[if (gte mso 9)|(lte ie 8)]><table role="presentation" align="center" border="0" cellspacing="0" cellpadding="0" width="552"><tr><![endif]--><!--
        --><!--
          --><!--[if (gte mso 9)|(lte ie 8)]><td align="left" valign="top" width="276"><![endif]--><!--
      --><div class="mobile-full" style="display: inline-block; vertical-align: top; width: 100%; max-width: 276px; -mru-width: 0px; min-width: calc(50%); max-width: calc(100%); width: calc(304704px - 55200%)"><!--
        --><table role="presentation" border="0" cellspacing="9" cellpadding="0" style="border-collapse: collapse; width: 100%; -yandex-p: calc(2px - 3%)" width="276" align="left">

            <tbody><tr><td width="100%" valign="top" align="left" style="font-weight: normal; color: #ffffff; font-size: 13px; font-family: Arial, Helvetica, sans-serif; text-align: left; padding: 9px; padding-top: 5px; padding-bottom: 5px; padding: 9px; padding-top: 5px; padding-bottom: 5px"><a style="color: #ffffff; text-decoration: underline" target="_new" href="https://domain.com/civicrm/?civiwp=CiviCRM&amp;q=civicrm%2Fmailing%2Funsubscribe&amp;reset=1&amp;jid=169&amp;qid=1577&amp;h=(randomnumbers)">Unsubscribe</a></td></tr>

        </tbody></table><!--
      --></div><!--[if (gte mso 9)|(lte ie 8)]></td><![endif]--><!--
          --><!--[if (gte mso 9)|(lte ie 8)]><td align="left" valign="top" width="276" class="mobile-hide"><![endif]--><!--
      --><div class="mobile-full mobile-hide" style="display: inline-block; vertical-align: top; width: 100%; max-width: 276px; -mru-width: 0px; min-width: calc(50%); max-width: calc(100%); width: calc(304704px - 55200%)"><!--
        --><table role="presentation" border="0" cellspacing="9" cellpadding="0" style="border-collapse: collapse; width: 100%; -yandex-p: calc(2px - 3%)" width="276" align="left">

            <tbody><tr><td width="100%" valign="top" align="right" style="font-weight: normal; color: #ffffff; font-size: 13px; font-family: Arial, Helvetica, sans-serif; text-align: right; padding: 9px; padding-top: 5px; padding-bottom: 5px; padding: 9px; padding-top: 5px; padding-bottom: 5px"><a href="https://domain.com/civicrm/?civiwp=CiviCRM&amp;q=civicrm%2Fmailing%2Fview&amp;reset=1&amp;id=33169d0e63f28a7c&amp;cid=206&amp;cs=(randomnumbers)" rel='nofollow' style="color: #ffffff; text-decoration: underline" target="_new"></a></td></tr>

        </tbody></table><!--
      --></div><!--[if (gte mso 9)|(lte ie 8)]></td><![endif]--><!--
        --><!--
      --><!--[if (gte mso 9)|(lte ie 8)]></tr></table><![endif]--></div></td>
    </tr>

      </tbody></table></div><!--
    --><!--[if (gte mso 9)|(lte ie 8)]></td></tr></table><![endif]-->
    </td></tr>
    </tbody></table>
    <!-- /preheaderBlock -->