Skip to content

Unescaped aria-label in md-nav elements #8054

@reteps

Description

@reteps

Context

With quotes in the right place, I can generate invalid HTML like so:

<nav class="md-nav" aria-label=""B">

Bug description

If I have a page like

# Page

## "B

The above header has an unescaped quote mark in the aria label (see the generated HTML snippet at the top of the report)

### C

I would expect the quotation mark to be escaped in the aria-label.

Related links

Reproduction

9.6.6-unescaped-aria-label-mark.zip

Steps to reproduce

  1. run mkdocs build
  2. inspect HTML file index.html, and observe invalid HTML

Image

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions