Skip to content
Snippets Groups Projects

Fix HTML attribute parsing, discard attributes not strating with a letter

Status with HTML content like

<a title=&quot;foo&quot[1]>

gets normalized to <a title="foo&quot" 1=true> and if received by pleroma-fe causes vue to set an attribute named "1", which fails on DOM setAttribute method.

In production mode this sends fe into endless error loop, making browser tab completely unresponsive.

This MR fixes the issue of attributes starting with non-letters being allowed.

Changes

  • Fixes HTML attribute parser, allowing only attributes with leading letter.
Edited by iamtakingiteasy

Merge request reports

Checking pipeline status.

Approval is optional

Merged by tusooatusooa 1 year ago (Sep 4, 2023 5:26pm UTC)

Merge details

  • Changes merged into develop with 1d679b59.
  • Deleted the source branch.

Pipeline #45894 passed

Pipeline passed for 1d679b59 on develop

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading