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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Discovery of the day : FF rewrites forms!!??? 1

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR
Hi,

I had a form that was functionning properly on all major browsers until recently.

So, after some long investigation, I found out that FireFox rewrites my HTML by changing this :

Code:
<input type="file" name="my_file[0][folder][0]">
<input type="file" name="my_file[0][folder][1]">

to this :

Code:
<input type="file" name="my_file_0_folder_0">
<input type="file" name="my_file_0_folder_1">

No wonder why my PHP code can't parse it anymore :(

Why do they do this now?
 
I don't think a square bracket is allowed in a name according to the HTML spec:


If that is the case, then Firefox may be doing something to replace an illegal character or something in an effort to be standards compliant. Just a guess.
 
Well, after two wasted hours, I found out that it was my PHP code that did the HTML change :(

Sorry for being so stupiiiiiiiiiiiiid ;)

As for the HTML spec, brackets being very useful for complex applications forms, I don't see why they don't make it a legit thing to do.

Thanks for your time anyway!
 
I seem to remember the rules on what characters are allowed as part of the NAME and ID attributes was changed from the HTML to the XHTML specs, so it would really depend on your DOCTYPE...

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top