Skip to content

Commit

Permalink
Merge pull request #695 from bramley/Mantis_20247
Browse files Browse the repository at this point in the history
Mantis 20247 - Do not replace message fields in a user-specific URL
  • Loading branch information
suelaP authored Aug 24, 2020
2 parents dcfdefb + b94cf44 commit 164a183
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion public_html/lists/admin/js/phplistapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ $(document).ready(function () {
return;
}
$("#remoteurlstatus").html(busyImage);
$("#remoteurlstatus").load("./?page=pageaction&action=checkurl&ajaxed=true&url=" + this.value);
$("#remoteurlstatus").load("./?page=pageaction&action=checkurl&ajaxed=true&url=" + encodeURIComponent(this.value));
});
$("#filtertext").on("focus",function () {
if (this.value == ' --- filter --- ') {
Expand Down
11 changes: 5 additions & 6 deletions public_html/lists/admin/sendemaillib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1539,16 +1539,15 @@ function precacheMessage($messageid, $forwardContent = 0)
output('parse config end');
}

//# ##17233 not that many fields are actually useful, so don't blatantly use all
// foreach($message as $key => $val) {
foreach (array('subject', 'id', 'fromname', 'fromemail') as $key) {
$val = $message[$key];
if (!is_array($val)) {
// Replace in content except for user-specific URL
if (!$cached[$messageid]['userspecific_url']) {
$cached[$messageid]['content'] = str_ireplace("[$key]", $val, $cached[$messageid]['content']);
$cached[$messageid]['textcontent'] = str_ireplace("[$key]", $val, $cached[$messageid]['textcontent']);
$cached[$messageid]['textfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['textfooter']);
$cached[$messageid]['htmlfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['htmlfooter']);
}
$cached[$messageid]['textcontent'] = str_ireplace("[$key]", $val, $cached[$messageid]['textcontent']);
$cached[$messageid]['textfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['textfooter']);
$cached[$messageid]['htmlfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['htmlfooter']);
}
/*
* cache message owner and list owner attribute values
Expand Down

0 comments on commit 164a183

Please sign in to comment.