Absolut Engine PHP Cross Reference Web Portal Systems

Source: /admin/wysiwyg/kevinrte/add.php - 32 lines - 1274 bytes - Summary - Text - Print

   1  <?
   2  /** Kevin's RTE function

   3   * WYSIWYG (Rich text editor) function for safe code inserting into RTE form

   4   */
   5  /** Kevin's RTE editor function

   6   * WYSIWYG (Rich text editor) function for safe code inserting into RTE form

   7   * @access private

   8   */
   9  function RTESafe($strText)
  10  {
  11  //returns safe code for preloading in the RTE

  12  $tmpString = trim($strText);
  13  //convert all types of single quotes

  14  $tmpString = str_replace(chr(145), chr(39), $tmpString);
  15  $tmpString = str_replace(chr(146), chr(39), $tmpString);
  16  $tmpString = str_replace("'", "&#39;", $tmpString);
  17  //convert all types of double quotes

  18  $tmpString = str_replace(chr(147), chr(34), $tmpString);
  19  $tmpString = str_replace(chr(148), chr(34), $tmpString);
  20  //    $tmpString = str_replace("\"", "\"", $tmpString);

  21  //replace carriage returns & line feeds

  22  $tmpString = str_replace(chr(10), " ", $tmpString);
  23  $tmpString = str_replace(chr(13), " ", $tmpString);
  24  return $tmpString;
  25  }
  26  $ae->text=RTESafe(stripslashes($ae->text));
  27  echo '<script language="JavaScript" type="text/javascript">';
  28  echo 'initRTE("wysiwyg/kevinrte/images/","wysiwyg/kevinrte/","");';
  29  echo 'writeRichText("text","',$ae->text,'",520,200,true,false);';
  30  echo 'function submitForm() { updateRTE("text"); return true; }';
  31  echo '</script>';
  32  ?>

title

Description

title

Description

title

Description

title

title

Body