function _casetracker_mail_plain_description in Case Tracker 5
Function to clear the possible html from a mail and generate readable txt version
Parameters
string:
Return value
string
1 call to _casetracker_mail_plain_description()
- casetracker_mail_send in ./
casetracker_mail.module - Sends out emails. Woot! Do people still say woot? Man, I'm old.
File
- ./
casetracker_mail.module, line 325 - Enables mail sending and Mailhandler integration for Case Tracker.
Code
function _casetracker_mail_plain_description($_description) {
// tags that should be have a newline behind their ass
$tags = array(
'</h1>',
'</h2>',
'</h3>',
'</h4>',
'</h5>',
'</h6>',
'</p>',
'<br>',
'<br/>',
'<br />',
'</div>',
'</pre>',
'</code>',
'</ul>',
'</ol>',
'</li>',
'</dl>',
'</dd>',
'</dt>',
);
foreach ($tags as $tag) {
$_description = str_replace($tag, $tag . "\n", $_description);
}
$result = filter_xss($_description, array(
'dd',
));
return $result;
}