Jump to content

[SOLVED] Rich text editor help


adam291086

Recommended Posts

Ok. I have found a free rich text editor for my website. I have played around with the code to get the text within the text box to transfer to another php page. My problem is that the varible is passed with \ \ \. I have set up a page to remove them but nothing happens. The code is below

 


<?php

if (!(isset($_POST["rte1"]))) {
echo "no variable set";
} 

else 

{
$tmpString = $_POST["rte1"];

//convert all types of single quotes
$tmpString = str_replace(chr(145), chr(39), $tmpString);
$tmpString = str_replace(chr(146), chr(39), $tmpString);
$tmpString = str_replace("'", "&#39;", $tmpString);

//convert all types of double quotes
$tmpString = str_replace(chr(147), chr(34), $tmpString);
$tmpString = str_replace(chr(148), chr(34), $tmpString);
$tmpString = str_replace("\"", "\"", $tmpString);

//replace carriage returns & line feeds
$tmpString = str_replace(chr(10), " ", $tmpString);
$tmpString = str_replace(chr(13), " ", $tmpString);

echo $tmpString;
}



?>

 

Thanks for any help

 

You can see whats happening here http://www.adamplowman.co.uk/cycling/rte/rte.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.