Skip to content

Random CSS id selector sometimes starts with a number - which is forbidden #146

@manuelebarraco

Description

@manuelebarraco

Hi! I'm using the accordion from your plugin and it is perfect!
I think I found a bug: in L244 of script.js the accordion_id is created using the random function from Math, getting a string which represents a number in base 36: accordion_id = Math.random().toString(36).substr(2, 9). This string sometimes starts with a number and this is forbidden in the HTML specification: when this happens the accordion doesn't work.
I tried to solve this bug modifying that line in this way accordion_id = 'e_' + Math.random().toString(36).substr(2, 9) and it works!

Thanks for your work,
Manuele

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions