php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30728 Can't print a </textarea> tag into <textarea> tag
Submitted: 2004-11-09 06:55 UTC Modified: 2004-11-09 07:36 UTC
From: sa1230usr at libero dot it Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.0.2 OS: Windows Xp
Private report: No CVE-ID: None
 [2004-11-09 06:55 UTC] sa1230usr at libero dot it
Description:
------------
When i read an html file with fread and inside that file there is a <textarea> tag than isn't possible to print(echo) the variable filled with fread inside another <textarea> tag cause the tag </textarea> in the variable close the <textarea> tag where is going to be printed!

Reproduce code:
---------------
$MyText='<textarea>MyTest</TextArea><br><input type=text>Not into the textarea tag!'

<textarea> echo $MyText;</textarea>

Expected result:
----------------
The variable $MyText should be fully showed inside the <textarea> tag also if contain tags of the same type.

Actual result:
--------------
It happend that variable $MyText isn't fully printed into <textarea> tag but it stop when is printed </textarea> tag.
The rest will be showed like normal html.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-09 07:36 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Not a bug, read about htmlspecialchars().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC