Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#44761 closed defect (bug) (fixed)

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

Reported by: itowhid06's profile itowhid06 Owned by: garrett-eclipse's profile 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 6 years ago.
44761.2.diff (2.4 KB) - added by birgire 6 years ago.
44761.3.diff (1.5 KB) - added by itowhid06 5 years ago.

Download all attachments as: .zip

Change History (13)

@itowhid06
6 years ago

#1 @garrett-eclipse
6 years 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.


6 years ago

#3 @desrosj
6 years ago

  • Keywords commit added

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

@birgire
6 years ago

#4 @birgire
6 years 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
5 years ago

  • Milestone changed from 4.9.9 to Future Release

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


5 years ago

#7 @garrett-eclipse
5 years 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.

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.

Version 0, edited 5 years ago by garrett-eclipse (next)

@itowhid06
5 years ago

#8 follow-up: @itowhid06
5 years 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
5 years 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
5 years 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.