htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
Bad HTML code produced by 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.

 


abmcr
New User

Jun 27, 2004, 11:50 AM

Post #1 of 5 (2407 views)
Shortcut
Bad HTML code produced by TextAREA??? Can't Post

I have try the very best HTMAREA with the example.html file. I have modified the form in the file for post in a php file :


.....

<form action="qui.php" method="post" >

<textarea id="Descr" name="Descr" style="width:100%" rows="20" cols="80">
Scrivi <font size="6">qui:</font> <span style="color: rgb(255, 0, 0);">sono</span> arrivato</h6>
<br />
</textarea>

<p />

<input type="submit" name="ok" value="OK" />
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />



</form>

...
In the php file(qui.php) i have simple the code:

<HTML>
<BODY>
<?php
print ($_POST["Descr"]);
?>
</BODY>
</HTML>

When the qui.php file is loaded i have a not well formatted text why the html code is bad: for example:

Scrivi <font size=\"6\">qui:</font> <span style=\"color: rgb(255, 0, 0);\>sono</span> arrivato

where the slash before 6 and after rgb(...) are not correct. What i do? Thank you

P.S.: the italian js not work correct. Tomorrow i want to post a correct file.
Andrea - ITALY


TehTreag
New User

Jun 27, 2004, 4:22 PM

Post #2 of 5 (2399 views)
Shortcut
Re: [abmcr] Bad HTML code produced by TextAREA??? [In reply to] Can't Post

In PHP, you have "magic_quotes_gpc" on (this is the default behavior). Use the function "stripslashes" before outputting it to the browser, however if you are going to store the data in a DB you will need to leave the extra escape characters.

See http://us2.php.net/stripslashes for more information.

Try

Code
<HTML> 
<BODY>
<?php
print (stripslashes($_POST["Descr"]));
?>
</BODY>
</HTML>



abmcr
New User

Jun 28, 2004, 3:55 AM

Post #3 of 5 (2379 views)
Shortcut
Re: [TehTreag] Bad HTML code produced by TextAREA??? [In reply to] Can't Post

Than you: i am a beginner with the PHP.

You write: " however if you are going to store the data in a DB you will need to leave the extra escape characters". How do i do?


dmny
New User

Jul 2, 2004, 8:59 PM

Post #4 of 5 (2233 views)
Shortcut
Re: [abmcr] Bad HTML code produced by TextAREA??? [In reply to] Can't Post


In Reply To
Than you: i am a beginner with the PHP.

You write: " however if you are going to store the data in a DB you will need to leave the extra escape characters". How do i do?

Just don't use stripslashes() with your DB insert code. If you use his example and only use stripslashes() when outputting the data, you will be fine.


abmcr
New User

Jul 3, 2004, 2:03 AM

Post #5 of 5 (2226 views)
Shortcut
Re: [dmny] Bad HTML code produced by TextAREA??? [In reply to] Can't Post

Thank you: that work fine.

 
 
 


Search for (options)