From 1f85a2294df31161a705404496e052836c9398ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Sat, 25 Jun 2016 09:52:17 +0200 Subject: [PATCH] remove empty brackets from title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/LWNprevBridge.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bridges/LWNprevBridge.php b/bridges/LWNprevBridge.php index 54fb71d..44bc555 100644 --- a/bridges/LWNprevBridge.php +++ b/bridges/LWNprevBridge.php @@ -118,7 +118,12 @@ class LWNprevBridge extends BridgeAbstract{ } $h2PrevSibling=null; - $item->title='['.$cat1.($cat2?'/'.$cat2:'').'] '.$h2->textContent; + $item->title=''; + if(!empty($cat1)){ + $item->title.='['.$cat1.($cat2?'/'.$cat2:'').'] '; + } + $item->title.=$h2->textContent; + $node=$h2; $content=''; $contentEnd=false;