/[drupal]/contributions/modules/word2web/word2web.module
ViewVC logotype

Diff of /contributions/modules/word2web/word2web.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3, Mon Jul 7 14:38:30 2008 UTC revision 1.4, Mon Jul 7 20:26:27 2008 UTC
# Line 229  function word2web_nodeapi(&$node, $op) { Line 229  function word2web_nodeapi(&$node, $op) {
229          $html_raw = _word2web_convert_chr($html_raw);          $html_raw = _word2web_convert_chr($html_raw);
230          set_error_handler('_word2web_suppress_errors');          set_error_handler('_word2web_suppress_errors');
231    
232            preg_match('/charset=([\w-]+)/', $html_raw, $matches);
233    
234            if ($matches[1] == 'windows-1256') {
235              $html_raw = iconv('windows-1256', 'utf-8', $html_raw);
236            }
237    
238          $html = new DOMDocument();          $html = new DOMDocument();
239          $html->loadHTML($html_raw);          $html->loadHTML($html_raw);
240          $images = $html->getElementsByTagName("img");          $images = $html->getElementsByTagName("img");
# Line 318  function word2web_manual($html_raw) { Line 324  function word2web_manual($html_raw) {
324    $path = drupal_get_path('module', 'word2web');    $path = drupal_get_path('module', 'word2web');
325    set_error_handler('_word2web_suppress_errors');    set_error_handler('_word2web_suppress_errors');
326    $html = $html_raw;    $html = $html_raw;
327    $html_raw = preg_replace("/<(img)([^>]*)>/mi", "<addr class='image' $2>-</addr>", $html_raw);    $html_raw = preg_replace("/<(img)([^>]*)>/mi",
328      "<addr class='image' $2>-</addr>",
329      $html_raw);
330    
331      if ($matches[1] == 'windows-1256') {
332        $html_raw = iconv('windows-1256', 'utf-8', $html_raw);
333      }
334    //preg_match('/charset=([\w-]+)/', $html_raw, $matches);    //preg_match('/charset=([\w-]+)/', $html_raw, $matches);
335    // This step apparently cleans up the XML a little.    // This step apparently cleans up the XML a little.
336    $html = new DOMDocument();    $html = new DOMDocument();

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2