Skip to main content

Bug Tracker

Side navigation

#11256 closed bug (invalid)

Opened January 30, 2012 02:07PM UTC

Closed February 14, 2012 08:08AM UTC

serialize() doesn't produce the exact same string as when you actually send the form: utf8 characters encoded differently

Reported by: matteosistisette Owned by: matteosistisette
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

Steps to reproduce:

  • create a HTML form
  • paste some chinese characters into a text field
  • send the form

> the chinise characters are converted into html entities, e.g. 投 and sent

Now copy the same input into the text field and call serialize() on the same form

> the chinese characters are just url-encoded without previously converting them into html entities

e.g. %E6%8A%95

The serialize() method should produce EXACTLY the same string that the browser places into the request when sending the same form.

Though, I am not sure whether this is a bug in jQuery or in the Javascript engine itself.

Attachments (0)
Change History (3)

Changed January 30, 2012 02:08PM UTC by matteosistisette comment:1

Sorry for the formatting. The "Steps to reproduce" part doesn't end where the list ends. The "Now copy..." part is the last step.

Changed January 30, 2012 02:36PM UTC by rwaldron comment:2

owner: → matteosistisette
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!

Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate:

Open the link and click to "Fork" (in the top menu) to begin.

Changed February 14, 2012 08:08AM UTC by trac-o-bot comment:3

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!