Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 7694)
+++ /CKEditor/trunk/CHANGES.html	(revision 7695)
@@ -36,5 +36,12 @@
 	</h1>
 	<h3>
-			CKEditor 3.6.6 (SVN)</h3>
+			CKEditor 3.6.6.1</h3>
+	<p>
+			Fixed issues:</p>
+	<ul>
+		<li>Security update: Added protection against XSS attack and possible path disclosure in PHP sample.</li>
+	</ul>
+	<h3>
+			CKEditor 3.6.6</h3>
 	<p>
 			Fixed issues:</p>
Index: /CKEditor/trunk/_samples/assets/_posteddata.php
===================================================================
--- /CKEditor/trunk/_samples/assets/_posteddata.php	(revision 7694)
+++ /CKEditor/trunk/_samples/assets/_posteddata.php	(revision 7695)
@@ -26,22 +26,22 @@
 <?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
+if (!empty($_POST))
+{
+	foreach ( $_POST as $key => $value )
+	{
+		if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
+			continue;
 
-foreach ( $postArray as $sForm => $value )
-{
-	if ( get_magic_quotes_gpc() )
-		$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
-	else
-		$postedValue = htmlspecialchars( $value ) ;
-
+		if ( get_magic_quotes_gpc() )
+			$value = htmlspecialchars( stripslashes((string)$value) );
+		else
+			$value = htmlspecialchars( (string)$value );
 ?>
 		<tr>
-			<th style="vertical-align: top"><?php echo htmlspecialchars($sForm); ?></th>
-			<td><pre class="samples"><?php echo $postedValue?></pre></td>
+			<th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
+			<td><pre class="samples"><?php echo $value; ?></pre></td>
 		</tr>
 	<?php
+	}
 }
 ?>
