diff --git a/src/main/java/com/commafeed/backend/feeds/FeedParser.java b/src/main/java/com/commafeed/backend/feeds/FeedParser.java
index db39bdf3..119fa974 100644
--- a/src/main/java/com/commafeed/backend/feeds/FeedParser.java
+++ b/src/main/java/com/commafeed/backend/feeds/FeedParser.java
@@ -9,6 +9,7 @@ import javax.ejb.Stateless;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.SystemUtils;
import org.jsoup.Jsoup;
+import org.jsoup.safety.Whitelist;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedEntry;
@@ -71,8 +72,14 @@ public class FeedParser {
}
private String handleContent(String content) {
- org.jsoup.nodes.Document doc = Jsoup.parse(content, "UTF-8");
- doc.select("a").attr("target", "_blank");
- return doc.outerHtml();
+ Whitelist whitelist = Whitelist.relaxed();
+ whitelist.addEnforcedAttribute("a", "target", "_blank");
+
+ // TODO evaluate potential security issues
+ whitelist.addTags("iframe");
+ whitelist.addAttributes("iframe", "src", "height", "width",
+ "allowfullscreen", "frameborder");
+
+ return Jsoup.clean(content, whitelist);
}
}
diff --git a/src/main/java/com/commafeed/frontend/pages/HomePage.html b/src/main/java/com/commafeed/frontend/pages/HomePage.html
index d287eb9e..821c4f25 100644
--- a/src/main/java/com/commafeed/frontend/pages/HomePage.html
+++ b/src/main/java/com/commafeed/frontend/pages/HomePage.html
@@ -28,7 +28,7 @@
-
+
diff --git a/src/main/webapp/css/app.css b/src/main/webapp/css/app.css
index 7fc751f3..6eb43f3c 100644
--- a/src/main/webapp/css/app.css
+++ b/src/main/webapp/css/app.css
@@ -58,7 +58,7 @@
}
.entrylist-header h3 {
- margin: 0px 0px 5px 0px;
+ margin: 5px 0px 5px 0px;
}
#feed-accordion .accordion-group {
diff --git a/src/main/webapp/directives/toolbar.html b/src/main/webapp/directives/toolbar.html
index bbc61ec8..39f02f51 100644
--- a/src/main/webapp/directives/toolbar.html
+++ b/src/main/webapp/directives/toolbar.html
@@ -1,19 +1,22 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
\ No newline at end of file
diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js
index ab4f07a5..068bb9c6 100644
--- a/src/main/webapp/js/controllers.js
+++ b/src/main/webapp/js/controllers.js
@@ -155,7 +155,13 @@ module.controller('FeedListCtrl', function($scope, $routeParams, $http,
}
};
+ $scope.isOpen = false
$scope.toggle = function(entry) {
+ if ($scope.current != entry) {
+ $scope.isOpen = true;
+ } else {
+ $scope.isOpen = !$scope.isOpen;
+ }
$scope.current = entry;
$scope.mark(entry, true);
}
diff --git a/src/main/webapp/templates/feeds.html b/src/main/webapp/templates/feeds.html
index dcd0a8ae..32d423bb 100644
--- a/src/main/webapp/templates/feeds.html
+++ b/src/main/webapp/templates/feeds.html
@@ -19,7 +19,7 @@
{{entry.title}}
-
+