From 91328684db89e336404aff4644f8a53a1db64cad Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 17 Feb 2013 20:32:29 +0100 Subject: Display media file size only if file exists (prevents PHP warning) --- inc/parser/xhtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/parser/xhtml.php') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 71f3aa4bf..4dd8c5e78 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -803,7 +803,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext); $link['class'] .= ' mediafile mf_'.$class; $link['url'] = ml($src,array('id'=>$ID,'cache'=>$cache),true); - $link['title'] .= ' (' . filesize_h(filesize(mediaFN($src))).')'; + if ($exists) $link['title'] .= ' (' . filesize_h(filesize(mediaFN($src))).')'; } if($hash) $link['url'] .= '#'.$hash; -- cgit v1.2.3 From b9b9b28b2edb54f9a3b3c5b9c69fd37a729007ec Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 23 Feb 2013 12:35:57 +0100 Subject: Fix double encoding in rss syntax FS#2731 --- inc/parser/xhtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/parser/xhtml.php') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 4dd8c5e78..84a999e56 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -889,7 +889,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // title is escaped by SimplePie, we unescape here because it // is escaped again in externallink() FS#1705 $this->externallink($item->get_permalink(), - htmlspecialchars_decode($item->get_title())); + html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8')); }else{ $this->doc .= ' '.$item->get_title(); } -- cgit v1.2.3