function html2xhtml($html) { process_pagebreak_commands($html); // Remove SCRIPT tags from the page being processed, as script content may // mess the firther html-parsing utilities $html = process_script($html); // Remove STYLE tags for the same reason and store them in the temporary variable // later they will be added back to HEAD section $styles = process_style($html); // Convert HTML character references to their Unicode analogues process_character_references($html); remove_comments($html); fix_attrs_spaces($html); $html = quote_attrs($html); $html = escape_attrs_entities($html); $html = lowercase_tags($html); $html = lowercase_closing_tags($html); $html = fix_closing_tags($html); $html = close_tag("area", $html); $html = close_tag("base", $html); $html = close_tag("basefont", $html); $html = close_tag("br", $html); $html = close_tag("col", $html); $html = close_tag("embed", $html); $html = close_tag("frame", $html); $html = close_tag("hr", $html); $html = close_tag("img", $html); $html = close_tag("input", $html); $html = close_tag("isindex", $html); $html = close_tag("link", $html); $html = close_tag("meta", $html); $html = close_tag("param", $html); $html = make_attr_value("checked", $html); $html = make_attr_value("compact", $html); $html = make_attr_value("declare", $html); $html = make_attr_value("defer", $html); $html = make_attr_value("disabled", $html); $html = make_attr_value("ismap", $html); $html = make_attr_value("multiple", $html); $html = make_attr_value("nohref", $html); $html = make_attr_value("noresize", $html); $html = make_attr_value("noshade", $html); $html = make_attr_value("nowrap", $html); $html = make_attr_value("readonly", $html); $html = make_attr_value("selected", $html); $html = process_html($html); $html = process_body($html); $html = process_head($html); $html = process_p($html); $html = escape_amp($html); $html = escape_lt($html); $html = escape_gt($html); $html = escape_textarea_content($html); process_tables($html, 0); process_lists($html, 0); process_deflists($html, 0); process_selects($html, 0); $html = fix_tags($html); $html = fix_attrs($html); $html = insert_styles($html, $styles); return $html; }
// set up the page to be grabbed $wpUtdInt->get_wp_page('retWpInc'); // Nothing happens until we execute WordPress with the following: eval($wpUtdInt->exec()); $wpUtdInt->exit_wp_integration(); $wpUtdInt = null; unset($wpUtdInt); } else { $wpuAbs->err_msg(GENERAL_ERROR, $wpuAbs->lang('WP_Not_Installed_Yet'), '', '', ''); } } else { require $phpbb_root_path . 'wp-united/wp-template-loader.' . $phpEx; } //If we want to show the page inside phpBB header/footer, we need to process it first if ($wpSettings['showHdrFtr'] == 'FWD' && !$wpuNoHead && !defined('WPU_REVERSE_INTEGRATION')) { $wpHdrInfo = process_head($retWpInc); //export styles to template - before or after phpBB depending on selection. $header_info_loc = $wpSettings['cssFirst'] == 'P' ? 'WP_HEADERINFO_LATE' : 'WP_HEADERINFO_EARLY'; $template->assign_vars(array($header_info_loc => $wpHdrInfo)); // We need to set the base HREF correctly, so that images and links in the phpBB header and footer work properly $wpuAbs->add_template_switch('PHPBB_BASE', $scriptPath); //Char Encoding if ('PHPBB2' == $wpuAbs->ver) { if ($wpSettings['charEncoding'] == 'MATCH_WP') { $lang['ENCODING'] = get_option('blog_charset'); } } if ('PHPBB2' == $wpuAbs->ver) { include $phpbb_root_path . 'includes/page_header.' . $phpEx; } else { global $wpu_page_title;