Skip to content

Enable fetching of source strings for Markdown fields in API for Pinguino - #25709

Merged
chrstinalin merged 4 commits into
mozilla:masterfrom
chrstinalin:#16513-markdown
Oct 30, 2026
Merged

chrstinalin merged 4 commits into
mozilla:masterfrom
chrstinalin:#16513-markdown

Conversation

@chrstinalin

@chrstinalin chrstinalin commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes mozilla/addons#16513

Description

Surfaces the unsanitized source of markdown-compatible fields in add-ons through the API, limited to authors.

Testing

See here for allowed Markdown. Anything outside of these is sanitized.

API
GETs from:

  1. /api/v5/addons/addon/
  2. /api/v5/addons/addon/(int:id|string:slug|string:guid)/
  3. /api/v5/addons/addon/(int:addon_id|string:addon_slug|string:addon_guid)/versions/
  4. /api/v5/addons/addon/(int:addon_id|string:addon_slug|string:addon_guid)/versions/(int:id|string:version_number)/
  5. /api/v5/addons/addon/(int:id|string:slug|string:guid)/eula_policy/

with show_source=true return the Markdown source of HTML fields.

Pinguino
On the listing & details section of an add-on:

  1. The description, developer_comments, eula, and privacy_policy fields render the sanitized HTML when not in edit mode.
  2. In edit mode, the unsanitized Markdown source is shown.

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add or update relevant docs reflecting the changes made.

@chrstinalin
chrstinalin marked this pull request as ready for review October 29, 2026 15:57
@chrstinalin
chrstinalin requested a review from a team as a code owner October 29, 2026 15:57
@chrstinalin
chrstinalin requested review from diox and removed request for a team October 29, 2026 15:57
@diox

diox commented Oct 30, 2026

Copy link
Copy Markdown
Member

Update the changelog in the API docs too

@chrstinalin
chrstinalin merged commit ff9c20f into mozilla:master Oct 30, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Data from the API that might contain Markdown should be fetchable in MD format

2 participants