10000 invalid ID attribute and character stripping · Issue #1230 · hakimel/reveal.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
invalid ID attribute and character stripping #1230
Closed
@bartoleo

Description

@bartoleo

I'm using a tool to create reveal.js slides from asciidoctor files.
Asciidoctor creates sections with id containing characters outside (a-z,A-Z,0-9,.,-,_,:), e.g.:
à è ì ò ù ...

readUrl functions checks id:

// Ensure the named link is a valid HTML ID attribute
            if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) {

writeUrl strips charactees:

id = id.replace( /[^a-zA-Z0-9\-\_\:\.]/g, '' );

These sections are not linkable from url.

There's a reason for these 'checks'?
HTML5 is very permissive about id attribute:
http://www.w3.org/TR/html5/dom.html#the-id-attribute

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0