<a href="mailto:?subject={TOPIC_TITLE}&body={CURRENT_URL}" target="_blank"> this works
just added a line to functions,php
Code: Select all
'CURRENT_URL' => generate_board_url(true) . '/' . $user->page['page'],
Code: Select all
'CURRENT_URL' => generate_board_url(true) . '/' . $user->page['page'],
Adding a SID to a URI that will land in an email which most likely is sent to a different person than the sender makes no sense at all. It's more like weakening security.
Code: Select all
<!-- END postrow -->
Code: Select all
<div class="panel">a href="mailto:?subject={TOPIC_TITLE}&body={CURRENT_URL} " target="_blank">
<img src="/email.png" border="0" alt="Email" width="40" height="40"></div>
Code: Select all
'CURRENT_URL' => generate_board_url(true) . '/' . $user->page['page'],
Code: Select all
<a href="mailto:?subject={TOPIC_TITLE}&body='.rawurlencode({CURRENT_URL}).' title="{TOPIC_TITLE}" target="_blank">
<img src="/email.png" border="0" alt="Email" width="40" height="40" >
I'm pretty sure it's the
&
, which is neither the entity it needs to be in the HTML context (&
), nor being percent-encoded in the URI parameter value context (%25
).Guys, you need to concentrate:greenwingmacaws2 wrote: ↑Tue May 24, 2022 3:08 pmCode: Select all
<a href="mailto:?subject={TOPIC_TITLE}&body='.rawurlencode({CURRENT_URL}).' title="
href
begins with a quotation ("
) but doesn't end with one - its content includes title=
.&
? That will suddenly end your email subject right there and afterwards begin a different URI parameter. Expect an URI that becomes mailto:?subject=Laurel & Hardy=funny&body=https%3A%2F%2Fboard.net%2Fviewtopic.php%3Ft=2620891%26start=15
to see what "encoding" means in each parameter.body
. Also for subject
.{{ TOPIC_TITLE | url_encode(true) }}
in your template file instead of {TOPIC_TITLE}
.