Follow-up to #2569293: Replace remaining !placeholder for Non-URL HTML outputs only in code Table.php

Problem/Motivation

See #2566503: [meta] Replace remaining !placeholder for Non-URL HTML outputs only

https://www.drupal.org/node/2566503#comment-10329861

Command to find these:
egrep -r '\Wt\(.*\!([a-zA-Z])+' * | grep '#title' | grep -v 'href="!' | grep -v "modules/views" | grep -v "vendor" | grep -v "\.js" | grep -v "\.css" | grep -v "~"

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner created an issue. See original summary.

lauriii’s picture

Issue summary: View changes
geertvd’s picture

Status: Active » Needs review
StatusFileSize
new4.08 KB
geertvd’s picture

+++ b/core/modules/views_ui/src/Form/Ajax/AddHandler.php
@@ -139,7 +139,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
-            '#title' => $this->t('!group: !field', array('!group' => $option['group'], '!field' => $option['title'])),
+            '#title' => $this->t('@group: @field', array('@group' => $option['group'], '@field' => $option['title'])),

This will cause double escaping on filter, sort and argument handlers on the add handler form.
Not sure how to fix that.

dawehner’s picture

geertvd’s picture

StatusFileSize
new3.46 KB
new4.55 KB

Removed the $entity->label() !placeholders.
Also took test coverage from #2567475: Views add field list label is being filter not escaped to add test coverage for #5

geertvd’s picture

Ah, should have read the parent issue better, will remove the ones in views also.

geertvd’s picture

StatusFileSize
new1.7 KB

The last submitted patch, 4: 2569295-4.patch, failed testing.

lauriii’s picture

Issue summary: View changes
lauriii’s picture

StatusFileSize
new1.81 KB
new1.42 KB
+++ b/core/modules/config_translation/src/FormElement/FormElementBase.php
@@ -162,9 +162,9 @@ protected function getSourceElement(LanguageInterface $source_language, $source_
-      '#title' => $this->t('!label <span class="visually-hidden">(!source_language)</span>', array(

!label is the string being translated which is just plain text, !source_language is the name of the language which is also just plain text

geertvd’s picture

@laurii, I didn't include @label since this is already covered in #2568781: Replace remaining !placeholder for Non-URL HTML outputs only for $entity->label()

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Well, its progress, better than nothing.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs a reroll.

lauriii’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs reroll
StatusFileSize
new1.68 KB
alexpott’s picture

Priority: Major » Critical

This is part of the critical meta.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed ae01d49 and pushed to 8.0.x. Thanks!

  • alexpott committed cd37e6b on 8.0.x
    Issue #2569295 by geertvd, lauriii: Replace remaining !placeholder for...

Status: Fixed » Closed (fixed)

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