Problem/Motivation

As part of #2296101: Remove SafeMarkup::set() use in \Drupal\Core\Render\Element\HtmlTag::preRenderHtmlTag(), we identified the potential improvement of removing #type => 'html_tag' (including dawehner in #4 and catch in #7.

From #38:

[T]he non-test uses [of #type => 'html_tag'] in core can be grouped into 2 categories: <head> elements such as <meta>, <link>, and <script>, and simple combinations where SafeMarkup::format could be used instead.

_drupal_add_html_head() is listed as deprecated (#2477223: Refactor _drupal_add_html_head, drupal_get_html_head, _drupal_add_html_head_link into the attachments processor, remove from common.inc.), so we may need to postpone on that. In the meantime, we could work on the 6 places where non-head-type tags are using this #type? (One of those places is FilterCaption.php, which has its own use of SafeMarkup).

Proposed resolution

remove the 6 places where non-head-type tags are using #type => 'html_tag'
and
Remove \Drupal\Core\Render\Element\HtmlTag

Remaining tasks

User interface changes

?

API changes

Data model changes

CommentFileSizeAuthor
#2 remove-2544318-2.diff658 bytesharjotsingh

Comments

akalata’s picture

Title: Remove » Remove \Drupal\Core\Render\Element\HtmlTag
harjotsingh’s picture

StatusFileSize
new658 bytes

According to https://www.drupal.org/node/2280965 i removed the SafeMarkup::set() from FilterCaption.php

harjotsingh’s picture

Status: Postponed » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: remove-2544318-2.diff, failed testing.

star-szr’s picture

Issue summary: View changes
yesct’s picture

Issue summary: View changes

@harjotsingh This issue is not to remove the set().
This issue is to remove
"6 places where non-head-type tags are using this #type => 'html_tag'"

harjotsingh’s picture

Shouldn't we remove SafeMarkup::set() call according to https://www.drupal.org/node/2280965.

joelpittet’s picture

Status: Needs work » Active

@harjotsingh Yes but the issue title and issue summary are not related to FilterCaption. If that issue is not already open please open it and add it to the meta. It looks like on the meta that issue hasn't been created yet. Can you create that for us? The meta issue summary has some instructions on how to do that.

harjotsingh’s picture

@joelpittet
yes, i'll open the issue and add it to meta.
Thanks for the clarification.

joelpittet’s picture

Version: 8.0.x-dev » 9.x-dev

This is likely not going to happen in the 8.x life cycle since we are in RC for 8.0.0 and still use this in core.

star-szr’s picture

Status: Active » Postponed
catch’s picture

Title: Remove \Drupal\Core\Render\Element\HtmlTag » Remove #type => html_tag usages
Version: 9.x-dev » 8.3.x-dev
Status: Postponed » Active

Before we can remove the element type, we need to remove the usages and deprecate it. So moving this back to 8.x for that.

joelpittet’s picture

Category: Task » Plan

Removing all of them can take some time, so let's do it one bit at a time. Moving this to a plan to hang some children off of.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

samuel.mortenson’s picture

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.