⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Mime
/
Viewer
/
Edit File: Plain.php
<?php /** * The Horde_Mime_Viewer_Plain class renders out plain text with URLs made * into hyperlinks (if viewing inline). * * Copyright 1999-2017 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @author Anil Madhavapeddy <anil@recoil.org> * @author Michael Slusarz <slusarz@horde.org> * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @package Mime_Viewer */ class Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Base { /** * This driver's display capabilities. * * @var array */ protected $_capability = array( 'full' => true, 'info' => false, 'inline' => true, 'raw' => false ); /** * Return the full rendered version of the Horde_Mime_Part object. * * @return array See parent::render(). */ protected function _render() { $text = $this->_mimepart->getContents(); $charset = $this->_mimepart->getCharset(); /* Check for 'flowed' text data. */ if ($this->_mimepart->getContentTypeParameter('format') == 'flowed') { $text = $this->_formatFlowed($text, $this->_mimepart->getContentTypeParameter('delsp')); } $text = '<html><body><tt>' . $this->_textFilter($text, 'Text2html', array( 'charset' => $charset, 'parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL )) . '</tt></body></html>'; return $this->_renderReturn( $text, 'text/html; charset=' . $charset ); } /** * Return the rendered inline version of the Horde_Mime_Part object. * * @return array See parent::render(). */ protected function _renderInline() { $text = Horde_String::convertCharset($this->_mimepart->getContents(), $this->_mimepart->getCharset(), 'UTF-8'); /* Check for 'flowed' text data. */ $data = ($this->_mimepart->getContentTypeParameter('format') == 'flowed') ? $this->_formatFlowed($text, $this->_mimepart->getContentTypeParameter('delsp')) : $text; return $this->_renderReturn( $data, 'text/html; charset=UTF-8' ); } /** * Format flowed text for HTML output. * * @param string $text The text to format. * @param boolean $delsp Was text created with DelSp formatting? * * @return string The formatted text. */ protected function _formatFlowed($text, $delsp = null) { $flowed = new Horde_Text_Flowed($text, $this->_mimepart->getCharset()); $flowed->setMaxLength(0); if (!is_null($delsp)) { $flowed->setDelSp($delsp); } return $flowed->toFixed(); } }
Simpan