+ [<%= jspUtil.out("knowledge.knowledgeId") %>]
+ <%= jspUtil.out("knowledge.title", JspUtil.ESCAPE_CLEAR) %>
+
- " disabled="disabled"/>
+ " disabled="disabled"/>
@@ -113,7 +114,7 @@
× <%= jspUtil.out("knowledge.likeCount") %>
- × <%= jspUtil.out("knowledge.commentsCount") %>
+ × <%= jspUtil.out("knowledge.commentCount") %>
@@ -182,9 +183,10 @@
?offset=<%= jspUtil.out("offset") %>&keyword=<%= jspUtil.out("keyword") %>"
class="list-group-item">
- [<%= jspUtil.out("history.knowledgeId") %>] <%= jspUtil.out("history.title") %>
+
+ [<%= jspUtil.out("history.knowledgeId") %>] <%= jspUtil.out("history.title") %>
- <%= jspUtil.out("history.content") %>
+ <%= jspUtil.out("history.content", 0, 40) %>
diff --git a/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp b/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp
index cae7923ee..a9d848305 100644
--- a/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp
+++ b/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp
@@ -43,10 +43,10 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>';
[<%= jspUtil.out("knowledgeId") %>] <%= jspUtil.out("title") %>
-
+
" disabled="disabled"/>
+ value="<%= jspUtil.out("tagNames") %>" disabled="disabled"/>
diff --git a/src/main/webapp/WEB-INF/views/protect/knowledge/view_add.jsp b/src/main/webapp/WEB-INF/views/protect/knowledge/view_add.jsp
index 0de1fa89b..390f17cc9 100644
--- a/src/main/webapp/WEB-INF/views/protect/knowledge/view_add.jsp
+++ b/src/main/webapp/WEB-INF/views/protect/knowledge/view_add.jsp
@@ -126,8 +126,8 @@ selectedGroups.push({label: '<%= jspUtil.out("group.groupName") %>', value: '<%=
diff --git a/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp b/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp
index 38e8fadaa..0068186fc 100644
--- a/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp
+++ b/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp
@@ -129,8 +129,8 @@ selectedGroups.push({label: '<%= jspUtil.out("group.groupName") %>', value: '<%=
diff --git a/src/test/java/org/support/project/knowledge/control/open/KnowledgeControlTest.java b/src/test/java/org/support/project/knowledge/control/open/KnowledgeControlTest.java
new file mode 100644
index 000000000..cadfb4545
--- /dev/null
+++ b/src/test/java/org/support/project/knowledge/control/open/KnowledgeControlTest.java
@@ -0,0 +1,59 @@
+package org.support.project.knowledge.control.open;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.Cookie;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.support.project.common.test.Order;
+import org.support.project.common.test.TestCase;
+import org.support.project.web.exception.InvalidParamException;
+import org.support.project.web.test.stub.ControlContainer;
+import org.support.project.web.test.stub.StubCookie;
+
+public class KnowledgeControlTest extends TestCase {
+ private ControlContainer container;
+ @Before
+ public void setUp() throws Exception {
+ container = new ControlContainer();
+ container.setContextPath("/knowledge");
+ List cookies = new ArrayList<>();
+ cookies.add(new StubCookie("KNOWLEDGE_HISTORY", "1,2,3,4,5,6,7,8"));
+ container.setCookies(cookies);
+ }
+ @After
+ public void tearDown() throws Exception {
+ }
+ @Test
+ @Order(order= 1)
+ public void testView() throws InvalidParamException {
+ KnowledgeControl control = container.getComp(KnowledgeControl.class);
+ control.view();
+ }
+
+ @Test
+ @Order(order= 2)
+ public void testList() throws Exception {
+ KnowledgeControl control = container.getComp(KnowledgeControl.class);
+ control.list();
+ }
+
+ // @Test
+ // public void testLike() {
+ // fail("Not yet implemented");
+ // }
+ //
+ // @Test
+ // public void testEscape() {
+ // fail("Not yet implemented");
+ // }
+ //
+ // @Test
+ // public void testSearch() {
+ // fail("Not yet implemented");
+ // }
+
+}
diff --git a/src/test/java/org/support/project/knowledge/logic/KnowledgeLogicTest.java b/src/test/java/org/support/project/knowledge/logic/KnowledgeLogicTest.java
index 34cdff09b..fa6e1fa8d 100644
--- a/src/test/java/org/support/project/knowledge/logic/KnowledgeLogicTest.java
+++ b/src/test/java/org/support/project/knowledge/logic/KnowledgeLogicTest.java
@@ -120,7 +120,7 @@ public void testSearchKnowledge() throws Exception {
eqdb(checks, entities);
checks = new ArrayList();
- list.get(1).setContent(StringUtils.abbreviate(list.get(1).getContent(), LuceneSearcher.CONTENTS_LIMIT_LENGTH));
+ list.get(1).setContent(list.get(1).getContent());
checks.add(list.get(1)); //スコア上
checks.add(list.get(0));