Problem/Motivation

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

modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php: $form_state->setError($element['title'], t('!name field is required.', array('!name' => $element['title']['#title'])));

Proposed resolution

Remaining tasks

Agree that removing HTML support makes sense.

User interface changes

None

API changes

Date format strings no longer support adding HTML using the \ escape character.

Data model changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because at the moment date formats support HTML but it is escaped
Issue priority Major because part of the critical to remove !placeholder
Disruption Disruptive for existing sites that are adding HTML to date formats. If HTML is required in a formatted date then the site should implement a custom field formatter to do this.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner created an issue. See original summary.

swentel’s picture

Status: Active » Needs review
FileSize
1.03 KB
angel.h’s picture

Assigned: Unassigned » angel.h
angel.h’s picture

Assigned: angel.h » Unassigned

Opps, wrong issue! Unassigning myself.

pfrenssen’s picture

Assigned: Unassigned » pfrenssen

Going to review.

pfrenssen’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
2.51 KB

Looking good. I tested this in the UI, and it works as expected:

I also scanned the whole Link module for exclamation marks, and this is the only instance of it being used as a placeholder.

pfrenssen’s picture

Assigned: pfrenssen » Unassigned

Looking good. I tested this in the UI, and it works as expected:

I also scanned the whole Link module for exclamation marks, and this is the only instance of it being used as a placeholder.

lauriii’s picture

+++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
@@ -159,7 +159,9 @@ public static function validateUriElement($element, FormStateInterface $form_sta
+      // here, so it won't be escaped again as it's already marked safe.

Here fits the previous line. Can be fixed on the commit

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed d0fd5b1 and pushed to 8.0.x. Thanks!

  • alexpott committed d0fd5b1 on 8.0.x
    Issue #2571949 by swentel, pfrenssen: Remove !placeholder in link module
    

Status: Fixed » Needs work

The last submitted patch, 2: 2571949-2.patch, failed testing.

dawehner’s picture

Status: Needs work » Fixed

Yeah this is actually fixed, buh PIFR.

Status: Fixed » Closed (fixed)

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