summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/File.php3
-rw-r--r--lib/util.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php
index 16e00024a..d71403e64 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -352,6 +352,9 @@ class File extends Memcached_DataObject
$mimetype = substr($mimetype,0,$semicolon);
}
if(in_array($mimetype,$notEnclosureMimeTypes)){
+ // Never treat HTML as an enclosure type!
+ return false;
+ } else {
$oembed = File_oembed::staticGet('file_id',$this->id);
if($oembed){
$mimetype = strtolower($oembed->mimetype);
diff --git a/lib/util.php b/lib/util.php
index 8f2a9f173..e6b62f750 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -877,7 +877,7 @@ function common_linkify($url) {
}
if (!empty($f)) {
- if ($f->getEnclosure() || File_oembed::staticGet('file_id',$f->id)) {
+ if ($f->getEnclosure()) {
$is_attachment = true;
$attachment_id = $f->id;