Hi,
I install the fck editor and the editor works and posts to the page I want it to but it keeps the html like so:
FCKeditor - Samples - Posted Data
This page lists all data posted by the form.
--------------------------------------------------------------------------------
FCKeditor1
<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
is there any way to remove the html.
Here is the code I use in the fck editor page:
<?php
include_once("fckeditor/fckeditor.php") ;
?>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form action="sampleposteddata.php" method="post" target="_blank">
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '/fckeditor/' ;
$oFCKeditor->Value = 'This is some sample text. You are using FCKeditor.' ;
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>
Here is the code in the update page:
<?php
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page lists the data posted by a form.
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>FCKeditor - Samples - Posted Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="sample.css" rel="stylesheet" type="text/css" >
</head>
<body>
<h1>FCKeditor - Samples - Posted Data</h1>
This page lists all data posted by the form.
<hr>
<?php
if ( isset( $_POST ) )
$postArray = &$_POST ; // 4.1.0 or later, use $_POST
else
$postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
foreach ( $postArray as $sForm => $value )
{
if ( get_magic_quotes_gpc() )
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
else
$postedValue = htmlspecialchars( $value ) ;
?>
<?php echo $sForm?>
<pre><?php echo $postedValue?></pre>
<?php
}
?>
</body>
</html>
Fri, 07/11/2008 - 21:43
#1
Re: HTML DISPLAYED PLEASE HELP
Re: HTML DISPLAYED PLEASE HELP
so remove all of this?
if ( get_magic_quotes_gpc() )
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
else
$postedValue = htmlspecialchars( $value ) ;
also how do I get the edit to stay on the page I edited?
the page displays but the content dissappears.
help.
thanks in advance.
Re: HTML DISPLAYED PLEASE HELP
<?php echo $value ?>
However, you have to be very careful - you may end up opening up your server to all sorts of bad things if you don't encode $value for all contexts, like HTML, MySQL, etc. Consider hiring somebody to at least walk you through the potential issues with handling raw HTML. If you want to do it yourself, read about HTML/URL/JS encoding, XSS and SQL injection vulnerabilities.
Re: HTML DISPLAYED PLEASE HELP
Re: HTML DISPLAYED PLEASE HELP
Re: HTML DISPLAYED PLEASE HELP
maybe all of you can help.
what I was originally looking for was a wysiwyg that would work with a blackberry.
fck editor seemed to be one of the ones that did.
any suggestions on how to use it and be secure and still work in a blackberry.
thanks for your help.
Re: HTML DISPLAYED PLEASE HELP