note 90806 added to function.htmlentities
| From: | testing_guru at indiatimes dot com | Date: | Mon, 11 May 2009 11:49:33 +0000 |
| Subject: | note 90806 added to function.htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154436@lists.php.net to get a copy of this message | ||
I have a strange problem and not sure where to list it. But I guess the best location is under
"htmlentities"...
I have 2 pages. One first page, I am taking some HTML input from the user with the help of
FCKEditor. The input contains HTML code, something similar to this:
<p>Enter your content in this box. You can also copy-paste directly from MS
Word.</p><p><img height="293" alt="" width="676"
src="Identify%20personalities%20small.JPG" /></p><table
cellspacing="1" cellpadding="1" width="200"
border="1"><tbody><tr><td
colspan="2"><strong><span style="font-family: Verdana">Heading
1</span></strong></td><td><strong><span style="font-family:
Verdana">Heading 2</span></strong></td></tr><tr><td>Cell
1</td><td>Cell 2</td><td>Cell
3</td></tr></tbody></table><p><span style="font-family:
Tahoma"><strong><span style="background-color: #ccffff">Shaded
row</span></strong></span></p>
I am passing above input as a parameter to a URL and then reading this parameter in my second page:
echo "Original: ".$_GET['message']."<br><br>";
$originalBody = htmlentities($_GET['message'], ENT_QUOTES);
echo "1st conversion: ".$originalBody."<br><br>";
$emailBody = '';
$emailBody = substr($originalBody, 1,
strpos($originalBody,");','','scrollbars=")-1);
echo "2nd conversion: ".$emailBody;
However, the output suddenly gets stripped off at the # in the "<span
style="background-color: #ccffff">" statement. I have also tried putting the # at
the beginning and have found that the output is nothing! I really don't know why the output is
being stripped of at the #...
I have tried many combinations but still am unable to find a solution. Please help urgently - email
would be appreciated. For more clarifications, please email me. Thanks!
----
Server IP: 59.162.86.8
Probable Submitter: 59.160.13.22
----
Manual Page -- http://www.php.net/manual/en/function.htmlentities.php
Edit -- https://master.php.net/note/edit/90806
Del: integrated -- https://master.php.net/note/delete/90806/integrated
Del: useless -- https://master.php.net/note/delete/90806/useless
Del: bad code -- https://master.php.net/note/delete/90806/bad+code
Del: spam -- https://master.php.net/note/delete/90806/spam
Del: non-english -- https://master.php.net/note/delete/90806/non-english
Del: in docs -- https://master.php.net/note/delete/90806/in+docs
Del: other reasons-- https://master.php.net/note/delete/90806
Reject -- https://master.php.net/note/reject/90806
Search -- https://master.php.net/manage/user-notes.php