Repository navigation
Prepare 2026-08-06 release - #2619
Merged
Merged
Conversation
Previously the detect args were read by blindly dereferencing `document.getElementById()` and parsing whatever `textContent` it returned, which throws an opaque `TypeError` if the element is absent or it wasn't a SCRIPT tag. Instead: - Query with `document.querySelector( 'script#…' )` rather than `getElementById()`. The subsequent `instanceof HTMLScriptElement` guard rejects a non-SCRIPT element anyway, so restricting the query to SCRIPT elements avoids matching an element that can never be used. - Hold the selector in a `jsonScriptSelector` variable so it is written once and reused in the "Missing" error message. - Throw an explicit error when the element is missing or is not a SCRIPT, and validate that the parsed JSON is a `[ string, object ]` tuple before it is destructured into the detect src and args. - Parse the more tailired `argsScript.text` instead of `argsScript.textContent`. `text` is typed as a non-null `string` on `HTMLScriptElement`, whereas `textContent` is `string | null` on every node, so this is better for static analysis. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Update the `Version` header and the version passed to the pending-plugin bootstrap in `load.php`, along with the `Stable tag` in `readme.txt`. Add the changelog entry for the release, covering the validation of SCRIPT#optimization-detective-detect-args. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Member
Author
This was referenced Aug 7, 2026
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
This includes a security release for Optimization Detective.
Use of AI Tools
Claude Code Opus assisted with authoring and squashing some previous commits, as well as doing the version bumps.