Follow-up to #2559445: Replace !placeholder with @placeholder in aggregator module

Problem/Motivation

In order to make #2506445: Replace !placeholder with @placeholder in t() and format_string() for non-URLs in tests approachable, we need to break it up into smaller chunks. This issue address !placeholder in the Help module

See #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand for complete motivation on removal of !placeholder

Proposed resolution

Replace !placeholder with @placeholder in the Help module.

core/modules/help/*

Remaining tasks

  1. Replace !placeholder with @placeholder. Refer to patch in #2506445-85: Replace !placeholder with @placeholder in t() and format_string() for non-URLs in tests as that patch should have related update
  2. Ensure tests come back clean
  3. Manually test the update and post screen shot after patch, review source for any difference in escaping.

User interface changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Active » Needs review
FileSize
10 KB
geertvd’s picture

Status: Needs review » Closed (duplicate)
justAChris’s picture

--- a/core/modules/help/src/Tests/HelpTest.php
+++ b/core/modules/help/src/Tests/HelpTest.php
@@ -67,7 +67,7 @@ public function testHelp() {
     // Verify that introductory help text exists, goes for 100% module coverage.
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/help');
-    $this->assertRaw(t('For more information, refer to the subjects listed in the Help Topics section or to the <a href="!docs">online documentation</a> and <a href="!support">support</a> pages at <a href="!drupal">drupal.org</a>.', array('!docs' => 'https://www.drupal.org/documentation', '!support' => 'https://www.drupal.org/support', '!drupal' => 'https://www.drupal.org')), 'Help intro text correctly appears.');
+    $this->assertRaw(t('For more information, refer to the subjects listed in the Help Topics section or to the <a href="@docs">online documentation</a> and <a href="@support">support</a> pages at <a href="@drupal">drupal.org</a>.', array('@docs' => 'https://www.drupal.org/documentation', '@support' => 'https://www.drupal.org/support', '@drupal' => 'https://www.drupal.org')), 'Help intro text correctly appears.');

This is not in that hook_help() patch, but @geertvd is correct that this should be closed. The "remaining" patch in #2506445: Replace !placeholder with @placeholder in t() and format_string() for non-URLs in tests can re-absorb this.

geertvd’s picture

Sutharsan’s picture

xjm’s picture