aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-21 05:27:53 -0700
committerFriendika <info@friendika.com>2011-05-21 05:27:53 -0700
commitbc2297d933cd1aab24321f723ef5485e584df156 (patch)
tree9945a55c8098d3325bc4086f06bac9eb3f586b48 /mod
parentccbdc9b2fc78b47935c79e748fb8bf75e827800f (diff)
downloadvolse-hubzilla-bc2297d933cd1aab24321f723ef5485e584df156.tar.gz
volse-hubzilla-bc2297d933cd1aab24321f723ef5485e584df156.tar.bz2
volse-hubzilla-bc2297d933cd1aab24321f723ef5485e584df156.zip
don't insert link summaries containing javascript bug #75
Diffstat (limited to 'mod')
-rw-r--r--mod/parse_url.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/mod/parse_url.php b/mod/parse_url.php
index ef9f8a9f4..30371e9f6 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -61,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)
@@ -77,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)