Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299521

Link HTTP header should not be HTML-encoded

$
0
0

Problem/Motivation

The URL in the Link HTTP header which can be added by HtmlResponseAttachmentsProcessor::processHtmlHeadLink() is HTML-encoded, but should not be.

Steps to reproduce

  1. Add a URL with & or other HTML special character to the Link HTTP header e.g. $render['#attached']['html_head_link'][] = [['href' => '/foo?bar=&baz=false', 'rel' => 'alternate'], TRUE];
  2. The Link HTTP header should contain </foo?bar=&baz=false> but contains </foo?bar=&amp;baz=false>

Proposed resolution

  1. Do not HTML-encode the contents of the HTTP header.
  2. Fix test to not expect an HTML-encoded HTTP header.

Remaining tasks


Viewing all articles
Browse latest Browse all 299521

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>