function _simplenews_define_replace in Simplenews 5
List of pattern replacements corresponding to patterns searched. Based on / modified from html2txt.module
1 call to _simplenews_define_replace()
- simplenews_html_to_text in ./
simplenews.module - Convert html text to plain text.
File
- ./
simplenews.module, line 1588
Code
function _simplenews_define_replace() {
$replace = array(
'',
// Non-legal carriage return
' ',
// Tabs
'',
// <script>s -- which strip_tags supposedly has problems with
"\"\n------------\" .strtoupper('\\1'). \"------------\n\n\"",
// H1 - H2
"\"\n\" . strtoupper('\\1') . \"\n\n\"",
// H3
"ucwords(\"\n\n\\1\n\n\")",
// H4 - H6
"\n\n\t",
// <blockquote>
"\n\n",
// </blockquote>
"\n\n",
// <p>
"\n",
// <br>
'*',
// <b> and <strong>
'/',
// <em> and <i>
"\n\n",
// <ul> and </ul>
"\n\n",
// <ol> and </ol>
"\n\n",
// <dl> and </dl>
" * ",
// <li>
"\n",
// </li>
" * ",
// <dt>
"\n",
// </dt>
"\t",
// <dd>
"\n",
// </dd>
"\n-------------------------\n",
// <hr>
"\n\n",
// <table> and </table>
"\n",
// <tr> and </tr>
"\t\t\\1\n",
// <td> and </td>
"strtoupper(\"\t\t\\1\n\")",
// <th> and </th>
' ',
'"',
'>',
'<',
'&',
'(c)',
'(tm)',
'"',
'"',
'-',
"'",
'&',
'(c)',
'(tm)',
'--',
'"',
'"',
'*',
'(R)',
'*',
'',
);
return $replace;
}