Skip to content

[P3] Replace inline onclick string-building with event delegation (escaping bug) #147

Description

@eboudrant

Priority: P3 · Review finding: #19

static/js/home.js / review.js build handlers as onclick="_fn('${escAttr(x)}')". escAttr turns ' into ', but the HTML parser decodes that back to ' before the JS engine parses the attribute — so a single quote in a module/template/profile name breaks the handler (and is theoretically injectable). Module names come from directory names, so it's reachable.

Fix: move to event delegation with data-* attributes (one listener per list container). Fixes the escaping class-wide and removes a lot of string-building. Requires a screenshot-baseline check since markup changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions