Commit d96918cc authored by alexpott's avatar alexpott

Issue #2319667 by aneek, vurt, dankh: Fixed Simpletest Module Double escaped...

Issue #2319667 by aneek, vurt, dankh: Fixed Simpletest Module Double escaped HTML in hook_requirements.
parent 7bcd1701
......@@ -8,6 +8,7 @@
use Symfony\Component\HttpFoundation\RedirectResponse;
use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\OpCodeCache;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Extension\ExtensionDiscovery;
use Drupal\Core\Site\Settings;
......@@ -1019,11 +1020,14 @@ function drupal_check_module($module) {
// Print any error messages
foreach ($requirements as $requirement) {
if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) {
$message = $requirement['description'];
$message = SafeMarkup::escape($requirement['description']);
if (isset($requirement['value']) && $requirement['value']) {
$message .= ' (' . t('Currently using !item !version', array('!item' => $requirement['title'], '!version' => $requirement['value'])) . ')';
}
drupal_set_message($message, 'error');
// The string was previously checked as safe or escaped properly with
// SafeMarkup::escape() method and the concatinated message string is
// designated safe by running through the t() function.
drupal_set_message(SafeMarkup::set($message), 'error');
}
}
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment