Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b560c9bc
Commit
b560c9bc
authored
Oct 19, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4457: Added support for using noscript for css files registered through…
Fixes #4457: Added support for using noscript for css files registered through asset bundles and Html helper
parent
5829020e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
BaseHtml.php
framework/helpers/BaseHtml.php
+5
-1
No files found.
framework/CHANGELOG.md
View file @
b560c9bc
...
...
@@ -11,6 +11,7 @@ Yii Framework 2 Change Log
-
Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
-
Enh #5587:
`json_encode`
is now used with
`JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE`
where it makes sense, also
it is now default for
`Json::encode()`
(samdark)
-
Enh #4457: Added support for using noscript for css files registered through asset bundles and Html helper (samdark)
-
Enh #5600: Allow configuring debug panels in
`yii\debug\Module::panels`
as panel class name strings (qiangxue)
-
Enh #5613: Added
`--overwrite`
option to Gii console command to support overwriting all files (motin, qiangxue)
-
Enh #5646: Call
`yii\base\ErrorHandler::unregister()`
instead of
`restore_*_handlers`
directly (aivus)
...
...
framework/helpers/BaseHtml.php
View file @
b560c9bc
...
...
@@ -197,8 +197,9 @@ class BaseHtml
* @param array $options the tag options in terms of name-value pairs. The following option is specially handled:
*
* - condition: specifies the conditional comments for IE, e.g., `lt IE 9`. When this is specified,
* the generated `
script
` tag will be enclosed within the conditional comments. This is mainly useful
* the generated `
link
` tag will be enclosed within the conditional comments. This is mainly useful
* for supporting old versions of IE browsers.
* - noscript: if set to true, `link` tag will be wrapped into `<noscript>` tags.
*
* The rest of the options will be rendered as the attributes of the resulting link tag. The values will
* be HTML-encoded using [[encode()]]. If a value is null, the corresponding attribute will not be rendered.
...
...
@@ -217,6 +218,9 @@ class BaseHtml
$condition
=
$options
[
'condition'
];
unset
(
$options
[
'condition'
]);
return
"<!--[if
$condition
]>
\n
"
.
static
::
tag
(
'link'
,
''
,
$options
)
.
"
\n
<![endif]-->"
;
}
elseif
(
isset
(
$options
[
'noscript'
])
&&
$options
[
'noscript'
]
===
true
)
{
unset
(
$options
[
'noscript'
]);
return
"<noscript>"
.
static
::
tag
(
'link'
,
''
,
$options
)
.
"</noscript>"
;
}
else
{
return
static
::
tag
(
'link'
,
''
,
$options
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment