WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 7 months ago

#44761 closed defect (bug) (fixed)

Privacy policy guide url is not escaped in Privacy Policy edit page

Reported by: itowhid06 Owned by: garrett-eclipse
Milestone: 5.2 Priority: normal
Severity: normal Version: 4.9.6
Component: Privacy Keywords: has-patch commit
Focuses: coding-standards Cc:

Description

Privacy policy guide URL is not escaped in Privacy Policy edit page notice. Escaping the URL will also make it inline with the Privacy policy guide URL shown in Privacy page when the privacy policy content change notice is shown.

Attachments (3)

patch.diff (806 bytes) - added by itowhid06 14 months ago.
44761.2.diff (2.4 KB) - added by birgire 13 months ago.
44761.3.diff (1.5 KB) - added by itowhid06 8 months ago.

Download all attachments as: .zip

Change History (13)

@itowhid06
14 months ago

#1 @garrett-eclipse
13 months ago

  • Focuses privacy added
  • Milestone changed from Awaiting Review to 4.9.9
  • Version set to 4.9.6

Thanks @itowhid06 good catch, I've added it to 4.9.9 to be reviewed next wednesday meeting on Slack in #core-privacy. Feel free to join - https://make.wordpress.org/meetings/

This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.


13 months ago

#3 @desrosj
13 months ago

  • Keywords commit added

Thanks for this one @itowhid06. Looks good to go for me.

@birgire
13 months ago

#4 @birgire
13 months ago

I hope you don't mind me adding 44761.2.diff for few related cases, e.g. another case for privacy policy url.

#5 @pento
12 months ago

  • Milestone changed from 4.9.9 to Future Release

This ticket was mentioned in Slack in #core-privacy by webdevlaw. View the logs.


11 months ago

#7 @garrett-eclipse
8 months ago

  • Focuses coding-standards added; privacy removed
  • Keywords needs-refresh dev-feedback added; commit removed

Thanks for the report and initial patch @itowhid06. And @birgire I appreciate the additional case.

Attempting to apply the patch currently fails for trunk. Along with a refresh I'm wondering if we can move the translator comments within the multiline printf statements.
Example from Coding Standards - https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#multiline-function-calls

I also feel the two instances of this translator comment could be made more explicit by indicating it's for the Privacy Policy page.
/* translators: 1: URL to edit page, 2: URL to preview page */
I'm thinking;
/* translators: 1: URL to edit Privacy Policy page, 2: URL to preview Privacy Policy page */

The translator comment changes can be handled in an additional ticket, just wanted to flag while I was reviewing.

Last edited 8 months ago by garrett-eclipse (previous) (diff)

@itowhid06
8 months ago

#8 follow-up: @itowhid06
8 months ago

@garrett-eclipse, Only updated two reported instances in 44761.3.diff(Hope, @birgire is fine with this). Didn't touch the translator comments as it might be better to address them in a separate ticket.

#9 in reply to: ↑ 8 @garrett-eclipse
7 months ago

  • Keywords commit added; needs-refresh dev-feedback removed
  • Milestone changed from Future Release to 5.2
  • Owner set to garrett-eclipse
  • Status changed from new to accepted

Replying to itowhid06:

@garrett-eclipse, Only updated two reported instances in 44761.3.diff(Hope, @birgire is fine with this). Didn't touch the translator comments as it might be better to address them in a separate ticket.

Thanks for the updated patch @itowhid06 it applies nicely and I don't see anymore overlooked occurrences. This looks good to go, am slating for 5.2 here.

I was able to connect with @birgire on his improvements and decided to spawn a new ticket for that - #46369

Also, this ticket is blocking #44876 as they affect the same two lines of code so upon commit I'll mark it as refresh.

Cheers

#10 @SergeyBiryukov
7 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 44779:

Privacy: Escape Privacy Policy guide URL in in Privacy Policy edit page notice.

Props itowhid06, garrett-eclipse.
Fixes #44761.

Note: See TracTickets for help on using tickets.