Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+28 -14
View File
@@ -633,7 +633,7 @@ abstract class _CustomField extends \IPS\Node\Model
{
if( $value !== NULL AND $value !== '' )
{
$value = explode( ',', htmlspecialchars( $value, \IPS\HTMLENTITIES | ENT_QUOTES, 'UTF-8', FALSE ) );
$value = explode( ',', htmlspecialchars( $value, ENT_DISALLOWED | ENT_QUOTES, 'UTF-8', FALSE ) );
}
$options['multiple'] = $this->multiple;
@@ -837,11 +837,11 @@ abstract class _CustomField extends \IPS\Node\Model
if ( $this->multiple )
{
return implode( '<br>', explode( ',', htmlspecialchars( $value, \IPS\HTMLENTITIES | ENT_QUOTES, 'UTF-8', FALSE ) ) );
return implode( '<br>', explode( ',', htmlspecialchars( $value, ENT_DISALLOWED | ENT_QUOTES, 'UTF-8', FALSE ) ) );
}
else
{
return htmlspecialchars( $value, \IPS\HTMLENTITIES | ENT_QUOTES, 'UTF-8', FALSE );
return htmlspecialchars( $value, ENT_DISALLOWED | ENT_QUOTES, 'UTF-8', FALSE );
}
case 'Codemirror':
@@ -854,7 +854,14 @@ abstract class _CustomField extends \IPS\Node\Model
return \IPS\DateTime::ts( $value, TRUE )->localeDate(); // See buildHelper for why we ignore the timezone
case 'Editor':
return $value;
if ( \IPS\Dispatcher::hasInstance() AND \IPS\Dispatcher::i()->controllerLocation === 'admin' )
{
return \IPS\Text\Parser::mungeResources( $value, TRUE );
}
else
{
return $value;
}
case 'Member':
return implode( '<br>', array_map( function( $id )
@@ -865,7 +872,7 @@ abstract class _CustomField extends \IPS\Node\Model
case 'Password':
if ( $value )
{
return $showSensitiveInformation ? htmlspecialchars( $value, \IPS\HTMLENTITIES | ENT_QUOTES, 'UTF-8', FALSE ) : '********';
return $showSensitiveInformation ? htmlspecialchars( $value, ENT_DISALLOWED | ENT_QUOTES, 'UTF-8', FALSE ) : '********';
}
return '';
@@ -876,19 +883,26 @@ abstract class _CustomField extends \IPS\Node\Model
return \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->rating( $this->options['max'], $value );
case 'TextArea':
return nl2br( htmlspecialchars( $value, \IPS\HTMLENTITIES | ENT_QUOTES, 'UTF-8', FALSE ) );
return nl2br( htmlspecialchars( $value, ENT_DISALLOWED | ENT_QUOTES, 'UTF-8', FALSE ) );
case 'Url':
$munged = ( $value ) ? \IPS\Http\Url::external( $value )->makeSafeForAcp() : NULL;
return ( $value ) ? \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->basicUrl( $munged, TRUE, $value ) : NULL;
return ( $value ) ? \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->basicUrl( $munged, TRUE, $value, TRUE, TRUE ) : NULL;
case 'Upload':
$file = \IPS\File::get( static::$uploadStorageExtension, $value );
$downloadUrl = \IPS\Http\Url::internal( 'applications/core/interface/file/cfield.php', 'none' )->setqueryString( array(
'storage' => $file->storageExtension,
'path' => (string) $file,
) );
return \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->uploadDisplay( $file, $downloadUrl );
if( $value )
{
$file = \IPS\File::get( static::$uploadStorageExtension, $value );
$downloadUrl = \IPS\Http\Url::internal( 'applications/core/interface/file/cfield.php', 'none' )->setqueryString( array(
'storage' => $file->storageExtension,
'path' => (string) $file,
) );
return \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->uploadDisplay( $file, $downloadUrl );
}
else
{
return '';
}
case 'Ftp':
$value = is_array( $value ) ? $value : json_decode( \IPS\Text\Encrypt::fromTag( $value )->decrypt(), TRUE );
@@ -905,7 +919,7 @@ abstract class _CustomField extends \IPS\Node\Model
default:
return htmlspecialchars( $value, \IPS\HTMLENTITIES | ENT_QUOTES, 'UTF-8', FALSE );
return htmlspecialchars( $value, ENT_DISALLOWED | ENT_QUOTES, 'UTF-8', FALSE );
}
}
}