Updated: Comment #0

Problem/Motivation

While working on the sub issues of #1823450: [Meta] Convert core listings to Views whenever views name is "Who's new" or "Who's online" the views operational links escapes html twice.

Before

issue.png

After

after
after

Proposed resolution

Correct escaping

Remaining tasks

Create patch

User interface changes

Right escaped out.

API changes

None

Follow-up from #2020395: Convert "Who's new" block to a View.
#2020399: Convert "Who's online" block to a View

Comments

jibran’s picture

damiankloip’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new3.83 KB

Yes, here the whole strings are escaped, so we don't really need to escape the display titles first. I thought we already fixed this once before to be honest.

jibran’s picture

Issue tags: +Needs screenshots

It needs screenshots once patch comes back green.

damiankloip’s picture

Really?! of a non escaped string? I think it just needs manual testing.

Status: Needs review » Needs work

The last submitted patch, 2: 2100959.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review

2: 2100959.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 2: 2100959.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review

2: 2100959.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 2: 2100959.patch, failed testing.

olli’s picture

Tested manually and works pretty well except for 'Enable @display_title'.

I think we should be able to write a test for this.

mr.baileys’s picture

Status: Needs work » Needs review
StatusFileSize
new2 KB
new6.43 KB
new2.69 KB
  • Fixed the remaining double-escaped drop-down button (Enable ...)
  • Added tests

The last submitted patch, 11: 2100959-11-views-dropdown-buttons-test-only.patch, failed testing.

damiankloip’s picture

+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
@@ -327,4 +327,26 @@ public function testViewStatus() {
+    $this->assertFieldByXpath('//input[@type="submit"]', t('Clone !display_title', array('!display_title' => $display_title)));

How about we replace this placeholder array for a variable, and just reuse that for all of these assertions?

Other that that, looking good! Thanks for writing some tests for this. I forgot about this issue :)

jibran’s picture

Status: Needs review » Needs work

NW according to #13.

damiankloip’s picture

Status: Needs work » Needs review
Issue tags: -Needs screenshots
StatusFileSize
new6.29 KB
new2.33 KB

I'll go. Let's get this done.

Don't think we need a screenshot either, we have one showing the initial issue. Plus, I think most people know what double escaped html looks like.

jibran’s picture

Category: Task » Bug report
Status: Needs review » Reviewed & tested by the community

It is a bug right? And it is fixed so RTBC.

jibran’s picture

Added after image. :P

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.