|
|
@ -547,8 +547,7 @@ class html2text
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function _convert_pre(&$text)
|
|
|
|
function _convert_pre(&$text)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
while(preg_match('/<pre[^>]*>(.*)<\/pre>/ismU', $text, $matches))
|
|
|
|
while(preg_match('/<pre[^>]*>(.*)<\/pre>/ismU', $text, $matches)) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$result = preg_replace($this->pre_search, $this->pre_replace, $matches[1]);
|
|
|
|
$result = preg_replace($this->pre_search, $this->pre_replace, $matches[1]);
|
|
|
|
$text = preg_replace('/<pre[^>]*>.*<\/pre>/ismU', '<div><br>' . $result . '<br></div>', $text, 1);
|
|
|
|
$text = preg_replace('/<pre[^>]*>.*<\/pre>/ismU', '<div><br>' . $result . '<br></div>', $text, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -563,8 +562,7 @@ class html2text
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function _preg_callback($matches)
|
|
|
|
function _preg_callback($matches)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch($matches[1])
|
|
|
|
switch($matches[1]) {
|
|
|
|
{
|
|
|
|
|
|
|
|
case 'b':
|
|
|
|
case 'b':
|
|
|
|
case 'strong':
|
|
|
|
case 'strong':
|
|
|
|
return $this->_strtoupper($matches[2]);
|
|
|
|
return $this->_strtoupper($matches[2]);
|
|
|
|