[Git][codeigniterpower/codeigniterpower][master] html heper - script tag - improve inclusion of source code detection

0 views
Skip to first unread message

Герхард PICCORO Lenz McKAY (@mckaygerhard)

unread,
Feb 13, 2023, 1:44:29 PM2/13/23
to venenux...@googlegroups.com

Герхард PICCORO Lenz McKAY pushed to branch master at codeigniterpower / codeigniterpower

Commits:

  • ffdd17dc
    by Герхард PICCORO Lenz McKAY at 2023-02-13T14:40:23-04:00
    html heper - script tag - improve inclusion of source code detection
    

1 changed file:

Changes:

  • appsys/helpers/html_helper.php
    ... ... @@ -353,18 +353,20 @@ if (! function_exists('script_tag')) {
    353 353
     				$src = array('src' => $src);
    
    354 354
     			}
    
    355 355
     		}
    
    356
    -		foreach ($src as $k => $v) {
    
    357
    -			if ($k === 'src' AND $indexPage === true) {
    
    358
    -				$src[$k] = site_url($v);
    
    359
    -			}
    
    360
    -			if ( ! array_key_exists('type', $src) ) {
    
    361
    -				$src['type'] = 'text/javascript';
    
    362
    -			}
    
    363
    -			if ( $k === 'content' ) {
    
    364
    -				$contenido = $v;
    
    365
    -				continue;
    
    356
    +		if( $open_only !== TRUE ) {
    
    357
    +			foreach ($src as $k => $v) {
    
    358
    +				if ($k === 'src' AND $indexPage === true) {
    
    359
    +					$src[$k] = site_url($v);
    
    360
    +				}
    
    361
    +				if ( ! array_key_exists('type', $src) ) {
    
    362
    +					$src['type'] = 'text/javascript';
    
    363
    +				}
    
    364
    +				if ( $k === 'content' ) {
    
    365
    +					$contenido = $v;
    
    366
    +					continue;
    
    367
    +				}
    
    368
    +				$script .= $k . (null === $v ? ' ' : '="' . $v . '" ');
    
    366 369
     			}
    
    367
    -			$script .= $k . (null === $v ? ' ' : '="' . $v . '" ');
    
    368 370
     		}
    
    369 371
     
    
    370 372
     		$script .= '>';
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help

Reply all
Reply to author
Forward
0 new messages