Make WordPress Core

Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#56159 closed defect (bug) (invalid)

Twenty Fourteen: Unescaped 'href' of an 'a' tag in 'inc/widgets.php'

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

Description

Hey! @everyone,

Well, It's my first ticket in WordPress Core. Excited to contribute to WordPress Core.

I've noticed an unescaped 'href' of an 'a tag' in 'wp-content/themes/twentyfourteen/inc/widgets.php' in line number 192. I think it should be escaped.

Thanks!

Attachments (1)

56159.patch (655 bytes) - added by mahbubshovan 22 months ago.
Good finding. This patch should get it done.

Download all attachments as: .zip

Change History (8)

@mahbubshovan
22 months ago

Good finding. This patch should get it done.

#1 @hztyfoon
22 months ago

Hey @paulamit. 🤗
Welcome to WordPress trac. Thanks for your ticket. Good findnings. Hope U'll make more contributions & make WordPress better.

Also, Thanks @mahbubshovan for the patch. It looks good to me.

#2 @hztyfoon
22 months ago

  • Keywords has-patch added

#3 @ocean90
22 months ago

  • Component changed from Themes to Bundled Theme
  • Focuses administration removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version trunk deleted

Hello @paulamit, welcome to WordPress Trac!

the_permalink() doesn't return the permalink but rather prints it
directly and already uses esc_url() before doing that. You can review
the source of the function in the code reference.

@paulamit @mahbubshovan @hztyfoon It's seems like you're working together. Please make sure you're also testing you patches and try to use the code reference to check how a function actually works. Thank you!

#4 @hztyfoon
22 months ago

Thanks @ocean90 for pointing it out.
I thought those should be escaped as they're inside 'href'.

Yes They're new and interested to core contribution. Just helping them out.

#5 @sajjad67
22 months ago

@paulamit @hztyfoon @mahbubshovan We appreciate your contributions of any kind! But don't create tickets first without checking the source code / the documentation! And to me also checking other tickets, it seems actually you're working together to submit any kind of patch. That's not how it works!

#6 @costdev
22 months ago

Agreed - we appreciate your contributions! Contributing to Core was learning experience for us all! Feel free to ping me on Slack (@costdev) if you have any questions.

Also, our next New Contributors Meeting is on Wednesday, July 13, 2022, 19:00 UTC which can be really useful for information and resources. Here's a link to our previous New Contributors Meeting for your reference.

#7 @SergeyBiryukov
22 months ago

  • Summary changed from unescaped 'href' of an 'a tag' in 'wp-content/themes/twentyfourteen/inc/widgets.php' in line number 192 to Twenty Fourteen: Unescaped 'href' of an 'a' tag in 'inc/widgets.php'
Note: See TracTickets for help on using tickets.