- ๐ฎ๐ณIndia mehul.gada Mumbai
mehul.gada โ made their first commit to this issueโs fork.
- @mehulgada opened merge request.
- ๐ฎ๐ณIndia mehul.gada Mumbai
Hi @COBadger,
I guess we don't need to replace URL placeholder from ":url" to "%url". If we use "%variable", it is also getting processed by placeholderEscape() and that adds "" tag around the placeholder variable. For replacing URL, we should specifically use ":variable", so that it is filtered for harmful URL protocol and at that same time "" tag is not added. In our case, the URL variable is used within the anchor tag in the warning text and if we use "%url", it is getting surrounded by "" tag, causing the anchor tag HTML to break (see attached screenshot) and accordingly breaking the unit test. So, I guess we should close this issue without fixing it.
Ref - https://chromatichq.com/insights/drupal-code-standards-t-function/
- Status changed to Needs review
over 1 year ago 2:25pm 23 March 2023 - Status changed to Needs work
over 1 year ago 7:49pm 1 April 2023 - Status changed to Postponed: needs info
about 1 year ago 5:25am 4 August 2023 - ๐ณ๐ฟNew Zealand quietone New Zealand
I tested this on Drupal 10.0.0, standard install and was not able to reproduce the problem. The message in question is generated in to different places in update.inc. I forced that code to execute during an update (via a temporary update hook). And in both cases the message displayed on screen and in the logs had the correct URL. And just to be sure, I clicked them and they worked.
Still trying to find the error I used
git log -L
to review the history of those lines. I did not find any changes to them since the code was originally committed.And it is using the correct placeholder, isn't it?
:variable: Return value is escaped with \Drupal\Component\Utility\Html::escape() and filtered for dangerous protocols using UrlHelper::stripDangerousProtocols(). Use this when using the "href" attribute, ensuring the attribute value is always wrapped in quotes:
from https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Rend...
Can anyone confirm the problem exists on a currently supported version of Drupal?
- Status changed to Closed: cannot reproduce
about 1 month ago 2:15am 8 August 2024 - ๐ฆ๐บAustralia acbramley
Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.
As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more than 1 year ago.
Since we need more information to move forward with this issue, I am closing it.
Please feel free to reopen with more information.