Skip to content
Snippets Groups Projects
Commit 7e4db970 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #929 from greezybacon/issue/926


thread: Fixup link URLs for emails

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 766f36dd 2ed876a2
No related branches found
No related tags found
No related merge requests found
......@@ -776,7 +776,7 @@ Class ThreadEntry {
}
function asVar() {
return (string) $this->getBody()->display('html');
return (string) $this->getBody()->display('email');
}
function getVar($tag) {
......@@ -1374,6 +1374,9 @@ class TextThreadBody extends ThreadBody {
switch ($output) {
case 'html':
return '<div style="white-space:pre-wrap">'
.Format::clickableurls($this->body).'</div>';
case 'email':
return '<div style="white-space:pre-wrap">'.$this->body.'</div>';
case 'pdf':
return nl2br($this->body);
......@@ -1384,7 +1387,7 @@ class TextThreadBody extends ThreadBody {
function asVar() {
// Email template, assume HTML
return $this->display('html');
return $this->display('email');
}
}
class HtmlThreadBody extends ThreadBody {
......@@ -1416,6 +1419,8 @@ class HtmlThreadBody extends ThreadBody {
return '(empty)';
switch ($output) {
case 'email':
return $this->body;
case 'pdf':
return Format::clickableurls($this->body, false);
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment