• Such as in modules/textarea.php:

    $atts['autocomplete'] = $tag->get_option(
    'autocomplete', '[-0-9a-zA-Z]+', true
    );

    The regex does not allow spaces. However, according to the MDN documentation on the autocomplete attribute (emphasis mine):

    The attribute value is either the keyword off or on, or an ordered list of space-separated tokens.

    And also gives an example with space-separated tokens:

    <input autocomplete="section-user1 billing postal-code" />

    It would be nice if the space character could be valid somehow please. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You’re right. It should allow multiple tokens in an autocomplete attribute.

    That said, you can’t simply allow whitespaces in the regex pattern since a whitespace works as a separator in form-tag options.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    This issue is being fixed in the next release. You can separate tokens with |, like this: autocomplete:section-user1|billing|postal-code

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Autocomplete attribute doesn’t allow multiple tokens’ is closed to new replies.