Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Commits
e50271a3
Commit
e50271a3
authored
9 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2541560
by yched, dawehner, Fabianx: Followup for [
#2529514
] - remove dead code
parent
d88f278d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/lib/Drupal/Core/DrupalKernel.php
+2
-10
2 additions, 10 deletions
core/lib/Drupal/Core/DrupalKernel.php
core/modules/filter/filter.module
+1
-1
1 addition, 1 deletion
core/modules/filter/filter.module
with
3 additions
and
11 deletions
core/lib/Drupal/Core/DrupalKernel.php
+
2
−
10
View file @
e50271a3
...
...
@@ -465,16 +465,8 @@ public function preHandle(Request $request) {
// Put the request on the stack.
$this
->
container
->
get
(
'request_stack'
)
->
push
(
$request
);
// Set the allowed protocols once we have the config available.
$allowed_protocols
=
$this
->
container
->
getParameter
(
'filter_protocols'
);
if
(
!
$allowed_protocols
)
{
// \Drupal\Component\Utility\UrlHelper::filterBadProtocol() is called by
// the installer and update.php, in which case the configuration may not
// exist (yet). Provide a minimal default set of allowed protocols for
// these cases.
$allowed_protocols
=
array
(
'http'
,
'https'
);
}
UrlHelper
::
setAllowedProtocols
(
$allowed_protocols
);
// Set the allowed protocols.
UrlHelper
::
setAllowedProtocols
(
$this
->
container
->
getParameter
(
'filter_protocols'
));
// Override of Symfony's mime type guesser singleton.
MimeTypeGuesser
::
registerWithSymfonyGuesser
(
$this
->
container
);
...
...
This diff is collapsed.
Click to expand it.
core/modules/filter/filter.module
+
1
−
1
View file @
e50271a3
...
...
@@ -501,7 +501,7 @@ function _filter_url($text, $filter) {
// we cannot cleanly differ between protocols here without hard-coding MAILTO,
// so '//' is optional for all protocols.
// @see \Drupal\Component\Utility\UrlHelper::filterBadProtocol()
$protocols
=
\Drupal
::
getContainer
()
->
getParameter
(
'filter_protocols'
)
?:
[
'http'
,
'https'
]
;
$protocols
=
\Drupal
::
getContainer
()
->
getParameter
(
'filter_protocols'
);
$protocols
=
implode
(
':(?://)?|'
,
$protocols
)
.
':(?://)?'
;
$valid_url_path_characters
=
"[\p
{
L}\p{M}\p{N
}
!\*\';:=\+,\.
\$
\/%#\[\]\-_~@&]"
;
...
...
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