Code:
if ($action=='prev_html') {
$html_content = $this_email->fields['email_html'];
$html_content = str_replace('_html_','<html>',$html_content);
$html_content = str_replace('_/html_','</html>',$html_content);
$html_content = str_replace('_head_','<head>',$html_content);
$html_content = str_replace('_/head_','</head>',$html_content);
$html_content = str_replace('_meta ','<meta ',$html_content);
$html_content = str_replace('_base','<base',$html_content);
$html_content = str_replace('_/style_','</style>',$html_content);
$html_content = str_replace('_style','<style',$html_content);
$html_content = str_replace('_body ','<body ',$html_content);
$html_content = str_replace('_/body_','</body> ',$html_content);
$html_content = str_replace('/_','/>',$html_content);
$html_content = str_replace('_table_','<table>',$html_content);
$html_content = str_replace('_table ','<table ',$html_content);
$html_content = str_replace('_/table','</table',$html_content);
$html_content = str_replace(array('_tr_','_tr>'),'<tr>',$html_content);
$html_content = str_replace(array('_/tr_','_/tr>'),'</tr>',$html_content);
$html_content = str_replace(array('_td_','<td_'),'<td>',$html_content);
$html_content = str_replace('_td ','<td ',$html_content);
$html_content = str_replace(array('_/td_','_/td>','</td_'),'</td>',$html_content);
$html_content = str_replace('"_','">',$html_content);
$html_content = str_replace('_ ','> ',$html_content);
$html_content = str_replace('_li>','<li>',$html_content);
$html_content = str_replace('_div ','<div ',$html_content);
$html_content = str_replace('_/div_','</div>',$html_content);
$html_content = str_replace('_/div','</div',$html_content);
$html_content = str_replace('_strong_','<strong>',$html_content);
$html_content = str_replace('_/strong_','</strong>',$html_content);
$html_content = str_replace('strong_','strong>',$html_content);
$html_content = str_replace('_/strong','</strong',$html_content);
$html_content = str_replace('_!','<!',$html_content);
$html_content = str_replace('--_','-->',$html_content);
$html_content = str_replace(array('_br_','_br /_','_br />'),'<br />',$html_content);
$html_content = str_replace('em_','em>',$html_content);
$html_content = str_replace('_/em','</em',$html_content);
$html_content = str_replace('_img ','<img ',$html_content);
$html_content = str_replace('_a href','<a href',$html_content);
$html_content = str_replace(array('_/a_','_/a>'),'</a>',$html_content);
$html_content = str_replace('"_','">',$html_content);
$html_content = str_replace('_nobr','<nobr',$html_content);
$html_content = str_replace(';nbsp;',' ',$html_content);
$html_content = str_replace('&','&',$html_content);
$html_content = str_replace('&&','&&',$html_content);
$html_content = str_replace('& ',' ',$html_content);
$html_content = str_replace('"','"',$html_content);
}
Bookmarks