Skip to content

Commit

Permalink
MINOR Removed references to ereg as comments
Browse files Browse the repository at this point in the history
  • Loading branch information
halkyon committed Apr 10, 2012
1 parent 4b2326c commit 2f1b7c1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions core/Convert.php
Expand Up @@ -235,10 +235,6 @@ static function html2raw($data, $preserveLinks = false, $wordWrap = 60, $config
$config = $defaultConfig;
}

// sTRIp style and script
/* $data = eregi_replace("<style(^A-Za-z0-9>][^>]*)?>.*</style[^>]*>","", $data);*/
/* $data = eregi_replace("<script(^A-Za-z0-9>][^>]*)?>.*</script[^>]*>","", $data);*/

$data = preg_replace("/<style([^A-Za-z0-9>][^>]*)?>.*?<\/style[^>]*>/is","", $data);
$data = preg_replace("/<script([^A-Za-z0-9>][^>]*)?>.*?<\/script[^>]*>/is","", $data);

Expand All @@ -250,9 +246,6 @@ static function html2raw($data, $preserveLinks = false, $wordWrap = 60, $config
if(!$preserveLinks && !$config['PreserveLinks']) {
$data = preg_replace('/<a[^>]*href\s*=\s*"([^"]*)">(.*?)<\/a>/ie', "Convert::html2raw('\\2').'[\\1]'", $data);
$data = preg_replace('/<a[^>]*href\s*=\s*([^ ]*)>(.*?)<\/a>/ie', "Convert::html2raw('\\2').'[\\1]'", $data);

/* $data = eregi_replace('<a[^>]*href *= *"([^"]*)">([^<>]*)</a>', '\\2 [\\1]', $data); */
/* $data = eregi_replace('<a[^>]*href *= *([^ ]*)>([^<>]*)</a>', '\\2 [\\1]', $data); */
}

// Replace images with their alt tags
Expand Down

0 comments on commit 2f1b7c1

Please sign in to comment.