1
4

1 回答 1

2

The technique of adding some special characters as hidden data was developed in the old days, when different browsers submitted data in different encodings. It is described e.g. in the document FORM submission and i18n as follows: “the author can add into the form a carefully-crafted "hidden" field which contains a number of diagnostic characters. When this field is submitted, the server can investigate the format of what has been submitted, and reach some conclusions as to what coding the client software was using.”</p>

The technique has lost much of its original relevance, but it is still a cheap way to do some basic correctness checking. It can detect problems e.g. when someone creates a copy of the form and uses it (due to ignorance, carelessness, or other reasons) to submit data so that the encoding is not what it should be.

于 2013-05-29T14:34:24.993 回答