diff options
author | Chris Case <kahotep@bunda.dreamhost.com> | 2011-05-21 21:40:16 -0700 |
---|---|---|
committer | Chris Case <kahotep@bunda.dreamhost.com> | 2011-05-21 21:40:16 -0700 |
commit | 4cff911939b263993eb41682ca558c975e2db01f (patch) | |
tree | 78f58e08d04413827744689d0f5df7660bee6caa /mod/parse_url.php | |
parent | 2cf696d0b5d647e1741d2f94ee379aa19b25ae1b (diff) | |
parent | f3f063c0dd7fd8b706987b856d79c7b58924acbb (diff) | |
download | volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.gz volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.bz2 volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.zip |
merged multipart email changes
Diffstat (limited to 'mod/parse_url.php')
-rw-r--r-- | mod/parse_url.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mod/parse_url.php b/mod/parse_url.php index b3b42b6cb..30371e9f6 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -5,11 +5,15 @@ require_once('library/HTML5/Parser.php'); function parse_url_content(&$a) { - $url = trim($_GET['url']); + logger('parse_url: ' . $_GET['url']); + + $url = trim(hex2bin($_GET['url'])); + + logger('parse_url: ' . $url); $text = null; - $template = "<a href=\"%s\" >%s</a>%s"; + $template = "<a href=\"%s\" >%s</a>\n%s"; $arr = array('url' => $url, 'text' => ''); @@ -57,6 +61,8 @@ function parse_url_content(&$a) { $items = $div->getElementsByTagName('p'); if($items) { foreach($items as $item) { + if($item->getElementsByTagName('script')) + continue; $text = $item->textContent; $text = strip_tags($text); if(strlen($text) < 100) @@ -73,6 +79,8 @@ function parse_url_content(&$a) { $items = $dom->getElementsByTagName('p'); if($items) { foreach($items as $item) { + if($item->getElementsByTagName('script')) + continue; $text = $item->textContent; $text = strip_tags($text); if(strlen($text) < 100) |