Global php does not render available variable in drupal 8.2 versions

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sajiniantony created an issue. See original summary.

PeteS’s picture

This is coming from a substitution using SafeMarkup, which seems to have been deprecated in favor of FormattableMarkup. The placeholders (from FormattableMarkup::placeholderFormat) should be in the format of @variable, %variable or :variable depending on the level of sanitizing that is desired. I don't know what !variable was intended to do, or if it was a typo, but I suspect that the fix for this is to change instances of !link to :link or @link or whatever.

caspervoogt’s picture

PeteS, I think you're right, but I have tried a few things and can't get it to act any differently.

joergM’s picture

Status: Active » Needs review
FileSize
6.03 KB

attached the patch for fixing the SafeMarkup::format issue.
Please review and comment.

joergM’s picture

FileSize
1.17 KB

Update patchfile without git differences.

hswong3i’s picture

Status: Needs review » Reviewed & tested by the community
rooby’s picture

This issue has a fix for the deprecated functions, which will apply over the top of this patch: #2681065: Remove depreciated methods in code base.

rooby’s picture

This patch changes % replacements with @ replacements.
The reason being that the % replacements wrap the replacement in an em tag and that really isn't proper use of em tags in this case.

rooby’s picture

DarkteK’s picture

#8 worked great, thx!

boby_ui’s picture

#8 confirmed working with 8.8.5, I understand all the patches should be implemented to the dev version?

boby_ui’s picture