thomascube
2009-08-27 6c2d7ed24343e510c2e0bd3e754436c48a4623a8
Strip xmlns attributes from html tag

1 files modified
2 ■■■■■ changed files
program/steps/mail/func.inc 2 ●●●●● patch | view | raw | blame | history
program/steps/mail/func.inc
@@ -676,11 +676,13 @@
    '/(<\/nobr>)(\s+)(<nobr>)/i',    // space(s) between <NOBR>
    '/<title>.*<\/title>/i',        // PHP bug #32547 workaround: remove title tag
    '/^(\0\0\xFE\xFF|\xFF\xFE\0\0|\xFE\xFF|\xFF\xFE|\xEF\xBB\xBF)/',    // byte-order mark (only outlook?)
    '/<html\sxmlns:[a-z]=[^>]+>/i',  // washtml/DOMDocument cannot handle xml namespaces
  );
  $html_replace = array(
    '\\1'.' &nbsp; '.'\\3',
    '',
    '',
    '<html>',
  );
  $html = preg_replace($html_search, $html_replace, $html);