Skip to content

Code Quality Fixes#76

Open
apermo wants to merge 30 commits into
pfefferle:masterfrom
apermo:fixes
Open

Code Quality Fixes#76
apermo wants to merge 30 commits into
pfefferle:masterfrom
apermo:fixes

Conversation

@apermo
Copy link
Copy Markdown

@apermo apermo commented May 27, 2026

This PR includes Code Style, PHPdoc and other code quality fixes.

Pushes with just phpcbf are marked as such.

Besides a few marked places no output should be altered.


This recreates #71, which was closed when my fork left the fork network.
The branch and commits are identical to the original; follow-up commits in
this PR additionally address the still-valid Copilot review findings from
#71 (output escaping in template-parts/entry-share.php and the comment
class attribute in functions.php).

Disclosure

Claude assisted with restoring the branch and with the follow-up escaping
commits. I reviewed the changes and take responsibility for them.

apermo and others added 30 commits April 5, 2025 08:23
removed unused globals
fixed code style
fixed phpdoc
Escape get_permalink(), wp_get_shortlink(), get_the_title(),
get_the_author(), get_the_excerpt() and get_the_date() output to
prevent potential XSS. Addresses the Copilot review findings on the
original PR (pfefferle#71).

Co-Authored-By: Claude <noreply@anthropic.com>
Wrap $comment->comment_type in esc_attr() since it is printed into a
class attribute. Addresses the Copilot review finding on the original
PR (pfefferle#71).

Co-Authored-By: Claude <noreply@anthropic.com>
@apermo apermo mentioned this pull request May 27, 2026
@apermo
Copy link
Copy Markdown
Author

apermo commented May 27, 2026

Follow-up commits address the still-valid Copilot review findings from #71:

  • d1ccdab — escapes the dynamic output in template-parts/entry-share.php (Copilot flagged unescaped get_permalink(), get_the_title(), get_the_author() and get_the_excerpt()).
  • dc16132 — wraps $comment->comment_type in esc_attr() in functions.php (also resolves my own open question on that line, where the missing echo was restored).

The Copilot comments on template-parts/entry-footer.php (the_permalink() should be escaped) are not actioned: WordPress core's the_permalink() already passes its output through esc_url(), so those are false positives.

The two includes/semantics.php Copilot comments were approvals of the existing changes, not change requests.

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.

1 participant