Skip to content

Commit 164a183

Browse files
authored
Merge pull request #695 from bramley/Mantis_20247
Mantis 20247 - Do not replace message fields in a user-specific URL
2 parents dcfdefb + b94cf44 commit 164a183

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

public_html/lists/admin/js/phplistapp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ $(document).ready(function () {
272272
return;
273273
}
274274
$("#remoteurlstatus").html(busyImage);
275-
$("#remoteurlstatus").load("./?page=pageaction&action=checkurl&ajaxed=true&url=" + this.value);
275+
$("#remoteurlstatus").load("./?page=pageaction&action=checkurl&ajaxed=true&url=" + encodeURIComponent(this.value));
276276
});
277277
$("#filtertext").on("focus",function () {
278278
if (this.value == ' --- filter --- ') {

public_html/lists/admin/sendemaillib.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,16 +1539,15 @@ function precacheMessage($messageid, $forwardContent = 0)
15391539
output('parse config end');
15401540
}
15411541

1542-
//# ##17233 not that many fields are actually useful, so don't blatantly use all
1543-
// foreach($message as $key => $val) {
15441542
foreach (array('subject', 'id', 'fromname', 'fromemail') as $key) {
15451543
$val = $message[$key];
1546-
if (!is_array($val)) {
1544+
// Replace in content except for user-specific URL
1545+
if (!$cached[$messageid]['userspecific_url']) {
15471546
$cached[$messageid]['content'] = str_ireplace("[$key]", $val, $cached[$messageid]['content']);
1548-
$cached[$messageid]['textcontent'] = str_ireplace("[$key]", $val, $cached[$messageid]['textcontent']);
1549-
$cached[$messageid]['textfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['textfooter']);
1550-
$cached[$messageid]['htmlfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['htmlfooter']);
15511547
}
1548+
$cached[$messageid]['textcontent'] = str_ireplace("[$key]", $val, $cached[$messageid]['textcontent']);
1549+
$cached[$messageid]['textfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['textfooter']);
1550+
$cached[$messageid]['htmlfooter'] = str_ireplace("[$key]", $val, $cached[$messageid]['htmlfooter']);
15521551
}
15531552
/*
15541553
* cache message owner and list owner attribute values

0 commit comments

Comments
 (0)