Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#62415 closed defect (bug) (invalid)

Twenty Twenty-Four: check PHPCS (escaping URLs)

Reported by: viralsampat's profile viralsampat Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.7
Component: Bundled Theme Keywords:
Focuses: coding-standards Cc:

Description

Hello Team,

I have reviewed the "Twenty Twenty Four" theme and found a few errors in some of the below files. Please below files:

Files:

/wp-content/themes/twentytwentyfour/patterns/text-centered-statement-small.php
/wp-content/themes/twentytwentyfour/patterns/footer-colophon-3-col.php
/wp-content/themes/twentytwentyfour/patterns/footer.php
/wp-content/themes/twentytwentyfour/patterns/footer-centered-logo-nav.php

Thanks,

Attachments (3)

62415.patch (1.6 KB) - added by viralsampat 2 months ago.
I have checked above mentioned issue and I have resolved it and added patch.
62415.2.patch (1.6 KB) - added by viralsampat 2 months ago.
I have checked above mentioned issue and I have resolved it and added patch.
esc_url-about_link.png (29.3 KB) - added by sabernhardt 2 months ago.
pieces of the link markup would become visible with esc_url( $about_link )

Download all attachments as: .zip

Change History (4)

@viralsampat
2 months ago

I have checked above mentioned issue and I have resolved it and added patch.

@viralsampat
2 months ago

I have checked above mentioned issue and I have resolved it and added patch.

@sabernhardt
2 months ago

pieces of the link markup would become visible with esc_url( $about_link )

#1 @sabernhardt
2 months ago

  • Keywords dev-feedback needs-testing has-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Summary changed from Check PHPcs Coding standard into the twenty twenty four theme. to Twenty Twenty-Four: check PHPCS (escaping URLs)

The footer patterns already use esc_url() where it belongs for their WordPress links, within the href="". Running the $wordpress_link variable through esc_url() would remove the WordPress link, and using the function on $about_link would corrupt the "Money Studies" book title link.

Note: See TracTickets for help on using tickets.