Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed CHtml::cssFile() ignore CHtml::$closeSingleTags #1540

Merged
merged 4 commits into from

2 participants

@creocoder
CHtml::$closeSingleTags=false;
echo CHtml::cssFile('http://example.com/style.css');

Without fix render:

<link rel="stylesheet" type="text/css" href="http://example.com/style.css" />

With fix render:

<link rel="stylesheet" type="text/css" href="http://example.com/style.css">
CHANGELOG
@@ -24,7 +24,8 @@ Version 1.1.13 work in progress
- Bug #1364: Empty CHtml::$errorCss cause class attribute rendering errors (creocoder)
- Bug #1444: Fixed CGoogleApi::register call to registerScriptFile (mdomba)
- Bug #1465: Fixed CHtml::beginForm() when CActiveForm with method GET and ajaxButton is used (mdomba)
-- Bug #1485 CSort does not quote table alias when using CDbCriteria (undsoft)
+- Bug #1485: CSort does not quote table alias when using CDbCriteria (undsoft)
+- Bug #1540: Fixed CHtml::cssFile() ignore CHtml::$closeSingleTags (creocoder)
@samdark Owner
samdark added a note

No need for changelog line since this fixed change that wasn't in release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@samdark samdark was assigned
@samdark samdark merged commit 967edc0 into yiisoft:master
@cebe cebe referenced this pull request
Merged

CHtml::cssFile() url fix 2 #1542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 6, 2012
  1. @creocoder

    CHtml::cssFile() fix

    creocoder authored
  2. @creocoder

    CHANGELOG

    creocoder authored
  3. @creocoder

    A little refactoring

    creocoder authored
  4. @creocoder

    Rollback CHANGELOG

    creocoder authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 3 deletions.
  1. +1 −3 framework/web/helpers/CHtml.php
View
4 framework/web/helpers/CHtml.php
@@ -270,9 +270,7 @@ public static function refresh($seconds, $url='')
*/
public static function cssFile($url,$media='')
{
- if($media!=='')
- $media=' media="'.$media.'"';
- return '<link rel="stylesheet" type="text/css" href="'.self::encode($url).'"'.$media.' />';
+ return CHtml::linkTag('stylesheet','text/css',self::encode($url),$media!=='' ? $media : null);
}
/**
Something went wrong with that request. Please try again.