Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE 6 mangling POSTed code

Status
Not open for further replies.

pgosse

Programmer
Sep 26, 2001
42
CA
Hi all. I’m not sure if this is a browser issue, or a php issue, but while I’m leaning more towards the side of browser I’m not really certain and I’m interested to see if anyone has had problems similar to this.

I’ve got a form by which html code is being submitted to a database. When I submit the form for some reason the code is being mangled. About the last half of the code is pasted at the end of the correct code, thus rendering it useless.

Please view the text files via the links below to see what I mean.

The code as it should be submitted is here:
The code as it is received after being posted is here:
As you can see, everything from just after the onmouseout handler on line 10 to the end of the code is being replicated at the end of the code.

Again, this happens immediately after the data is posted.

Does anyone have any ideas here?

TMIA,
Pablo
 
Hmm, I don't think we have the relevant data to give you an answer. You mentioned php. What is the script that grabs the data from the form? Are you using method post or get? How does the form which is used for submitting the code look? Does this happen with every code you post, or just this one? By default you'd have a textarea on the first page, where the person would enter html and on the second page, some script that would retrieve that information. If you do a print_r ($_POST); on your second page, is the code mangled there? Try to answer this questions and then we can help.
 
Hi there, Vragabond. Sorry, I should've provided more detail but I've been beating my head against this for about 7 hours straight now.

This is all happening within a content manangement system that I'm wriring. Here's the detailed skinny on what's going on:

Language used: PHP
Form method: Post

I have a page which allows users to edit code snippets. There is a textarea on this page into which is pulled a snippet from the cms database.

The textarea tag has the following attributes set:

name="snippet"
class="textinput"
style="width:740px; font-family:courier"
rows="50"
wrap="off"

The content being fine in the database, this is how the code appears in the textarea:


When the user submits the form it is passed to a PHP page. To ensure that nothing in my PHP is causing the problem, the first line of this file is:

Code:
die($_POST['snippet']);

so I can see right away what the value is before it's touched by any of my code.

This is how the code appears IMMEDIATELY after it has been posted:


What's happening is that everything from just about the end of the onmouseout statement in line 10 is being copied and added to the end of the code.

The stranger thing is that it works fine in an older version of the CMS which I have running off a different server.

Might this be a server config issue?

Thanks much in advance,
Pablo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top