htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
textarea vs. textarea


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


ExeCRabLE
Novice

Jan 9, 2005, 10:08 AM

Post #1 of 5 (3119 views)
Shortcut
textarea vs. textarea Can't Post

Hi,

i have the good old problem with the textarea-tags inside the textarea-tag from htmlArea.


Code
<textarea id="ta" name="ta" style="width:98%" rows="30"> 
<? echo "$s_c"; ?>
</textarea>


My sourcecodes using the textareas and i need them, but htmlArea interpret the included textareas wrong.

Anybody knows an simple workaround or something else ?

by
ExeCRabLE


sleemanj
User

Jan 9, 2005, 11:55 AM

Post #2 of 5 (3106 views)
Shortcut
Re: [ExeCRabLE] textarea vs. textarea [In reply to] Can't Post

You tried


Code
<?php echo html_entities($s_c) ?>


?


James Sleeman
PHP Programmer


ExeCRabLE
Novice

Jan 10, 2005, 1:00 AM

Post #3 of 5 (3065 views)
Shortcut
Re: [sleemanj] textarea vs. textarea [In reply to] Can't Post

hi,

why and what i have to convert ? I have no spezial characters or something else. When i have to convert the textarea-tag, how i have to do it ?

ciao
ExeCRabLE


sleemanj
User

Jan 10, 2005, 1:49 AM

Post #4 of 5 (3061 views)
Shortcut
Re: [ExeCRabLE] textarea vs. textarea [In reply to] Can't Post


In Reply To
hi,

why and what i have to convert ? I have no spezial characters or something else. When i have to convert the textarea-tag, how i have to do it ?


<, > and & are special characters and will need escaping when you put them inside a textarea tag. Textareas should be fed with TEXT not HTML.

EG...

Code
 This is the wrong way 
---------------------
<textarea >
<textarea>blah</textarea>
<strong>here is more stuff</strong>
</textarea>

This is the right way
---------------------
<textarea>
&lt;textarea&gt;blah&lt;/textarea&gt;
&lt;strong&gt;here is more stuff&lt;/strong&gt;
</textarea>



The PHP function htmlspecialchars() will escape the special characters for you.


James Sleeman
PHP Programmer


ExeCRabLE
Novice

Jan 10, 2005, 3:19 AM

Post #5 of 5 (3039 views)
Shortcut
Re: [sleemanj] textarea vs. textarea [In reply to] Can't Post

Thanks,

now it works... Cool


Code
<?php echo "<textarea id='ta' name='ta' style='width:100%; height: 35em;'>", htmlspecialchars($content), "</textarea>" ?>


bye !
ExeCRabLE

 
 
 


Search for (options)