[Bug 28034] New: support <input maxbytes="200">

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28034

            Bug ID: 28034
           Summary: support <input maxbytes="200">
           Product: HTML WG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: netmosfera@gmail.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org

Hello HTML team,

The maxlength attribute is fine as long you don't use a language that requires
multibyte sequences for its characters.

<input maxlength="127" maxbytes="127" bytes-charset="UTF8"> 
^ will be stored as UTF8
<input maxlength="127" maxbytes="127" bytes-charset="UTF16">
^ will be stored as UTF16

This means: you are allowed to enter up to 127 characters, as long their size
in bytes is lower or equal to 127 bytes using the specified encoding (fallbacks
to the accept-charset="" one, or the page's one).

Plenty of web applications already do this check using javascript for
preventing form submission of data that would inevitably cause an error (or be
truncated).

HTH

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Monday, 16 February 2015 12:13:55 UTC