grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026', $start_border); //get the closing tag after marker ">"; //extract the input tag string $working_str = substr($bodyHTML, $marker-3, $end_border-($marker-3)); //replace input markup with text areas markups $new_str = str_replace('input', 'textarea', $working_str); $new_str = str_replace("type=\"text\"", ' ', $new_str); $new_str = $new_str . '> ', '> ', $new_str); //merge the processed string back into bodyhtml string $bodyHTML = str_replace($working_str, $new_str, $bodyHTML); } //<<<----------end replacing marked text inputs with text area tags $guid = create_guid(); $form_file = "upload://$guid"; $SugarTiny = new SugarTinyMCE(); $html = $SugarTiny->cleanEncodedMCEHtml($bodyHTML); //Check to ensure we have tags in the form. Without them, IE8 will attempt to display the page as XML. if (stripos($html, "" . $html . ""; } if (!mb_detect_encoding($str, 'UTF-8')) { $html = utf8_encode($html); } $html = str_replace('Â', ' ', $html); file_put_contents($form_file, $html); $html = htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); $xtpl=new XTemplate('modules/Campaigns/WebToLeadDownloadForm.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $webformlink = "$mod_strings[LBL_DOWNLOAD_TEXT_WEB_TO_LEAD_FORM]
"; $webformlink .= "$mod_strings[LBL_DOWNLOAD_WEB_TO_LEAD_FORM]"; $xtpl->assign("LINK_TO_WEB_FORM", $webformlink); $xtpl->assign("RAW_SOURCE", $html); $xtpl->parse("main.copy_source"); $xtpl->parse("main"); $xtpl->out("main");