You are here

function _views_send_html_replace in Views Send 6

Helper function for _views_send_html_to_text(). Inspired from Simplenews.

List of preg regular expression patterns to search for and replace with.

1 call to _views_send_html_replace()
_views_send_html_to_text in ./views_send.module
HTML to text conversion for HTML and special characters. Converts some special HTMLcharacters in addition to drupal_html_to_text(). Inspired from Simplenews,

File

./views_send.module, line 822
The Views Send module.

Code

function _views_send_html_replace() {
  return array(
    '/"/i' => '"',
    '/>/i' => '>',
    '/&lt;/i' => '<',
    '/&amp;/i' => '&',
    '/&copy;/i' => '(c)',
    '/&trade;/i' => '(tm)',
    '/&#8220;/' => '"',
    '/&#8221;/' => '"',
    '/&#8211;/' => '-',
    '/&#8217;/' => "'",
    '/&#38;/' => '&',
    '/&#169;/' => '(c)',
    '/&#8482;/' => '(tm)',
    '/&#151;/' => '--',
    '/&#147;/' => '"',
    '/&#148;/' => '"',
    '/&#149;/' => '*',
    '/&reg;/i' => '(R)',
    '/&bull;/i' => '*',
    '/&euro;/i' => 'Euro ',
  );
}