Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443915
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443915
Commits
e55f12ae
Commit
e55f12ae
authored
7 years ago
by
Gabor Hojtsy
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2873825
by josephcheek: Add Change record to
@deprecated
in SafeMarkup
(cherry picked from commit
19854be6
)
parent
56f85f23
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/lib/Drupal/Component/Utility/SafeMarkup.php
+7
-0
7 additions, 0 deletions
core/lib/Drupal/Component/Utility/SafeMarkup.php
with
7 additions
and
0 deletions
core/lib/Drupal/Component/Utility/SafeMarkup.php
+
7
−
0
View file @
e55f12ae
...
...
@@ -13,6 +13,8 @@
* @link sanitization sanitization functions @endlink or the @link theme_render theme and render systems @endlink
* so that the output can can be themed, escaped, and altered properly.
*
* @see https://www.drupal.org/node/2549395
*
* @see TwigExtension::escapeFilter()
* @see twig_render_template()
* @see sanitization
...
...
@@ -34,6 +36,8 @@ class SafeMarkup {
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Instead, you should just check if a variable is an instance of
* \Drupal\Component\Render\MarkupInterface.
*
* @see https://www.drupal.org/node/2549395
*/
public
static
function
isSafe
(
$string
,
$strategy
=
'html'
)
{
return
$string
instanceof
MarkupInterface
;
...
...
@@ -58,6 +62,7 @@ public static function isSafe($string, $strategy = 'html') {
* possible, \Drupal\Component\Utility\Html::escape() can be used in places
* where explicit escaping is needed.
*
* @see https://www.drupal.org/node/2549395
* @see drupal_validate_utf8()
*/
public
static
function
checkPlain
(
$text
)
{
...
...
@@ -84,6 +89,8 @@ public static function checkPlain($text) {
*
* @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
* Use \Drupal\Component\Render\FormattableMarkup.
*
* @see https://www.drupal.org/node/2549395
*/
public
static
function
format
(
$string
,
array
$args
)
{
return
new
FormattableMarkup
(
$string
,
$args
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment