FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add some missing content sanitization by dkotter · Pull Request #950 · WordPress/ai · GitHub

/ ai Public

Add some missing content sanitization - #950

Merged
dkotter merged 3 commits into
WordPress:developfrom
dkotter:add/content-resizing-sanitization
Aug 18, 2026
Merged

Add some missing content sanitization#950
dkotter merged 3 commits into
WordPress:developfrom
dkotter:add/content-resizing-sanitization

Conversation

dkotter commented Aug 18, 2026
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

What?

Ensure content we render has been passed through sanitization functions

Why?

In reviewing a separate PR, I was prompted to do some larger review of our codebase to ensure any content we pull from the editor to send to an LLM, or content we receive back from an LLM and render in the editor, has been passed through proper sanitization. For the most part that was already being done but there were a few areas that could be improved, which this PR does.

How?

  • For the Editorial Updates feature, ensure the content we receive from the LLM passes through wp_kses_post
  • For the Content Resizing feature, ensure the content we render is passed through safeHTML
  • For the Type Ahead feature, ensure the content we grab is passed through an inert element so it can never execute

Use of AI Tools

AI assistance: Yes
Tool(s): Claude
Model(s): Opus 5
Used for: Reviewing our entire codebase for missing sanitization and adding those in. Review and testing by me

Testing Instructions

The changes here touch Editorial Updates, Content Resizing and Type Ahead so turn those features on and ensure they all work as expected

Changelog Entry

Security - Ensure any content we render from the LLM or content we send to the LLM is properly sanitized.

dkotter added this to the 1.3.0 milestone Aug 18, 2026
dkotter self-assigned this Aug 18, 2026
dkotter requested a review from a team August 18, 2026 15:20

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.87%. Comparing base (c5b25ca) to head (4d5a610).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #950   +/-   ##
==========================================
  Coverage      73.87%   73.87%           
  Complexity      3032     3032           
==========================================
  Files            132      132           
  Lines          12006    12006           
==========================================
  Hits            8869     8869           
  Misses          3137     3137           
Flag Coverage Δ
unit 73.87% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dkotter merged commit 5c81c0e into WordPress:develop Aug 18, 2026
30 checks passed
dkotter deleted the add/content-resizing-sanitization branch August 18, 2026 15:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL