Skip to content

Commit 696517d

Browse files
committed
0.4.1 リリース
1 parent 0b1827d commit 696517d

24 files changed

Lines changed: 198 additions & 186 deletions

File tree

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>org.support-project</groupId>
55
<artifactId>knowledge</artifactId>
66
<packaging>war</packaging>
7-
<version>0.4.0</version>
7+
<version>0.4.1</version>
88
<name>webapp for knowledge</name>
99
<url>https://support-project.org/</url>
1010

@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>org.support-project</groupId>
1919
<artifactId>web</artifactId>
20-
<version>0.4.0</version>
20+
<version>0.4.1</version>
2121
</dependency>
2222

2323
<dependency>

src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ public Boundary like() throws InvalidParamException {
231231
* @return
232232
*/
233233
public Boundary escape(KnowledgesEntity entity) {
234+
super.setSendEscapeHtml(false);
234235
return super.send(entity);
235236
}
236237

src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.support.project.common.config.ConfigLoader;
3737
import org.support.project.common.log.Log;
3838
import org.support.project.common.log.LogFactory;
39+
import org.support.project.common.util.HtmlUtils;
3940
import org.support.project.common.util.StringUtils;
4041
import org.support.project.knowledge.config.AppConfig;
4142
import org.support.project.knowledge.config.IndexType;
@@ -156,12 +157,21 @@ private Query structQuery(final SearchingValue value) throws ParseException {
156157

157158
QueryParser queryParser = new QueryParser(Version.LUCENE_4_10_2, FIELD_LABEL_TITLE, analyzer);
158159
queryParser.setDefaultOperator(Operator.OR);
159-
Query query = queryParser.parse(value.getKeyword());
160+
Query query;
161+
try {
162+
query = queryParser.parse(value.getKeyword());
163+
} catch (org.apache.lucene.queryparser.classic.ParseException e) {
164+
query = queryParser.parse(value.getKeyword().replaceAll("/", ""));
165+
}
160166
miniContainer.add(query, BooleanClause.Occur.SHOULD);
161167

162168
queryParser = new QueryParser(Version.LUCENE_4_10_2, FIELD_LABEL_CONTENTS, analyzer);
163169
queryParser.setDefaultOperator(Operator.OR);
164-
query = queryParser.parse(value.getKeyword());
170+
try {
171+
query = queryParser.parse(value.getKeyword());
172+
} catch (org.apache.lucene.queryparser.classic.ParseException e) {
173+
query = queryParser.parse(value.getKeyword().replaceAll("/", ""));
174+
}
165175
miniContainer.add(query, BooleanClause.Occur.SHOULD);
166176

167177
container.add(miniContainer, BooleanClause.Occur.MUST);

src/main/resources/appresource.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ message.success.save.target={1} was Saved.
5050
message.allready.updated=Allready updated.
5151

5252
# Common Label
53-
label.version=0.4.0
53+
label.version=0.4.1
5454
label.login=Sign in
5555
label.previous = Previous
5656
label.next=Next

src/main/resources/appresource_ja.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ message.success.save.target={1} \u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002
5050
message.allready.updated=\u3059\u3067\u306b\u66f4\u65b0\u3055\u308c\u3066\u3044\u307e\u3059
5151

5252
# Common Label
53-
label.version=0.4.0
53+
label.version=0.4.1
5454
label.login=\u30b5\u30a4\u30f3\u30a4\u30f3
5555
label.previous = \u524d\u3078
5656
label.next = \u6b21\u3078

src/main/webapp/WEB-INF/views/admin/mail/config.jsp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ function deleteMail() {
3636

3737
<div class="form-group">
3838
<label for="host"><%= jspUtil.label("knowledge.mail.label.host") %></label>
39-
<input type="text" class="form-control" name="host" id="host" placeholder="SMTP HOST" value="${host}" />
39+
<input type="text" class="form-control" name="host" id="host" placeholder="SMTP HOST" value="<%= jspUtil.out("host") %>" />
4040
</div>
4141
<div class="form-group">
4242
<label for="port"><%= jspUtil.label("knowledge.mail.label.port") %></label>
43-
<input type="text" class="form-control" name="port" id="port" placeholder="SMTP PORT" value="${port}" />
43+
<input type="text" class="form-control" name="port" id="port" placeholder="SMTP PORT" value="<%= jspUtil.out("port") %>" />
4444
</div>
4545
<div class="form-group">
4646
<label for="authType_lock"><%= jspUtil.label("label.auth") %></label><br/>
@@ -57,22 +57,22 @@ function deleteMail() {
5757
</div>
5858
<div class="form-group">
5959
<label for="smtpId"><%= jspUtil.label("knowledge.mail.label.auth.id") %></label>
60-
<input type="text" class="form-control" name="smtpId" id="smtpId" placeholder="SMTP ID" value="${smtpId}" />
60+
<input type="text" class="form-control" name="smtpId" id="smtpId" placeholder="SMTP ID" value="<%= jspUtil.out("smtpId") %>" />
6161
</div>
6262
<div class="form-group">
6363
<label for="smtpPassword"><%= jspUtil.label("knowledge.mail.label.auth.password") %></label>
64-
<input type="password" class="form-control" name="smtpPassword" id="smtpPassword" placeholder="SMTP PASSWORD" value="${smtpPassword}" />
64+
<input type="password" class="form-control" name="smtpPassword" id="smtpPassword" placeholder="SMTP PASSWORD" value="<%= jspUtil.out("smtpPassword") %>" />
6565
</div>
6666
<div class="form-group">
6767
<label for="fromAddress"><%= jspUtil.label("knowledge.mail.label.auth.send.address") %></label>
68-
<input type="text" class="form-control" name="fromAddress" id="fromAddress" placeholder="送信元アドレス" value="${fromAddress}" />
68+
<input type="text" class="form-control" name="fromAddress" id="fromAddress" placeholder="送信元アドレス" value="<%= jspUtil.out("fromAddress") %>" />
6969
</div>
7070
<div class="form-group">
7171
<label for="fromName"><%= jspUtil.label("knowledge.mail.label.auth.send.name") %></label>
72-
<input type="text" class="form-control" name="fromName" id="fromName" placeholder="送信者名" value="${fromName}" />
72+
<input type="text" class="form-control" name="fromName" id="fromName" placeholder="送信者名" value="<%= jspUtil.out("fromName") %>" />
7373
</div>
7474

75-
<input type="hidden" name="systemName" value="${systemName}" />
75+
<input type="hidden" name="systemName" value="<%= jspUtil.out("systemName") %>" />
7676

7777
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;<%= jspUtil.label("label.save") %></button>
7878
<button type="button" class="btn btn-danger" onclick="deleteMail();"><i class="fa fa-remove"></i>&nbsp;<%= jspUtil.label("label.delete") %></button>

src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424

2525
<c:forEach var="entry" items="${entries}" varStatus="status">
2626
<div class="list-group-item">
27-
<a href="<%= request.getContextPath() %>/admin.users/accept/${entry.id}" class="btn btn-primary">
27+
<a href="<%= request.getContextPath() %>/admin.users/accept/<%= jspUtil.out("entry.id") %>" class="btn btn-primary">
2828
<i class="fa fa-gavel"></i>&nbsp;<%= jspUtil.label("knowledge.accept.label.accept") %>
2929
</a>
30-
<h4 class="list-group-item-heading">${entry.userName} (${entry.userKey})</h4>
30+
<h4 class="list-group-item-heading"><%= jspUtil.out("entry.userName") %> (<%= jspUtil.out("entry.userKey") %>)</h4>
3131
<p class="list-group-item-text">
3232
<%= jspUtil.label("label.regist.datetime") %>
3333
<i class="fa fa-calendar"></i>&nbsp;<%= jspUtil.date("user.insertDatetime")%> /

src/main/webapp/WEB-INF/views/admin/users/list.jsp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
<nav>
2020
<ul class="pager">
2121
<li class="previous">
22-
<a href="<%= request.getContextPath() %>/admin.users/list/${previous}"><span aria-hidden="true">&larr;</span>
22+
<a href="<%= request.getContextPath() %>/admin.users/list/<%= jspUtil.out("previous") %>"><span aria-hidden="true">&larr;</span>
2323
<%= jspUtil.label("label.previous") %></a>
2424
</li>
2525
<li >
26-
<a href="<%= request.getContextPath() %>/admin.users/view_add?offset=${offset}"><i class="fa fa-plus-circle"></i>&nbsp;
26+
<a href="<%= request.getContextPath() %>/admin.users/view_add?offset=<%= jspUtil.out("offset") %>"><i class="fa fa-plus-circle"></i>&nbsp;
2727
<%= jspUtil.label("label.add") %></a>
2828
</li>
2929
<li class="next">
30-
<a href="<%= request.getContextPath() %>/admin.users/list/${next}"><%= jspUtil.label("label.next") %>
30+
<a href="<%= request.getContextPath() %>/admin.users/list/<%= jspUtil.out("next") %>"><%= jspUtil.label("label.next") %>
3131
<span aria-hidden="true">&rarr;</span></a>
3232
</li>
3333
</ul>
@@ -40,8 +40,8 @@
4040
</c:if>
4141

4242
<c:forEach var="user" items="${users}" varStatus="status">
43-
<a href="<%= request.getContextPath() %>/admin.users/view_edit/${user.userId}?offset=${offset}" class="list-group-item">
44-
<h4 class="list-group-item-heading">${user.userName} (${user.userKey})</h4>
43+
<a href="<%= request.getContextPath() %>/admin.users/view_edit/<%= jspUtil.out("user.userId") %>?offset=<%= jspUtil.out("offset") %>" class="list-group-item">
44+
<h4 class="list-group-item-heading"><%= jspUtil.out("user.userName") %> (<%= jspUtil.out("user.userKey") %>)</h4>
4545
<p class="list-group-item-text">
4646
<%= jspUtil.label("label.regist.datetime") %> / <%= jspUtil.label("label.update.datetime") %>
4747
<i class="fa fa-calendar"></i>&nbsp;<%= jspUtil.date("user.insertDatetime")%> /
@@ -56,15 +56,15 @@
5656
<nav>
5757
<ul class="pager">
5858
<li class="previous">
59-
<a href="<%= request.getContextPath() %>/admin.users/list/${previous}"><span aria-hidden="true">&larr;</span>
59+
<a href="<%= request.getContextPath() %>/admin.users/list/<%= jspUtil.out("previous") %>"><span aria-hidden="true">&larr;</span>
6060
<%= jspUtil.label("label.previous") %></a>
6161
</li>
6262
<li >
63-
<a href="<%= request.getContextPath() %>/admin.users/view_add?offset=${offset}"><i class="fa fa-plus-circle"></i>&nbsp;
63+
<a href="<%= request.getContextPath() %>/admin.users/view_add?offset=<%= jspUtil.out("offset") %>"><i class="fa fa-plus-circle"></i>&nbsp;
6464
<%= jspUtil.label("label.add") %></a>
6565
</li>
6666
<li class="next">
67-
<a href="<%= request.getContextPath() %>/admin.users/list/${next}"><%= jspUtil.label("label.next") %>
67+
<a href="<%= request.getContextPath() %>/admin.users/list/<%= jspUtil.out("next") %>"><%= jspUtil.label("label.next") %>
6868
<span aria-hidden="true">&rarr;</span></a>
6969
</li>
7070
</ul>

src/main/webapp/WEB-INF/views/admin/users/view_add.jsp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,43 @@
2525

2626
<div class="form-group">
2727
<label for="userKey"><%= jspUtil.label("knowledge.signup.label.mail") %></label>
28-
<input type="text" class="form-control" name="userKey" id="userKey" placeholder="Mail Address" value="${userKey}" />
28+
<input type="text" class="form-control" name="userKey" id="userKey" placeholder="Mail Address" value="<%= jspUtil.out("userKey") %>" />
2929
</div>
3030
<div class="form-group">
3131
<label for="userName"><%= jspUtil.label("knowledge.signup.label.name") %></label>
32-
<input type="text" class="form-control" name="userName" id="userName" placeholder="User Name" value="${userName}" />
32+
<input type="text" class="form-control" name="userName" id="userName" placeholder="User Name" value="<%= jspUtil.out("userName") %>" />
3333
</div>
3434

3535
<div class="form-group">
3636
<label for="password"><%= jspUtil.label("knowledge.signup.label.password") %></label>
37-
<input type="password" class="form-control" name="password" id="password" placeholder="Password" value="${password}" />
37+
<input type="password" class="form-control" name="password" id="password" placeholder="Password" value="<%= jspUtil.out("password") %>" />
3838
</div>
3939
<div class="form-group">
4040
<label for="confirm_password"><%= jspUtil.label("knowledge.signup.label.confirm.password") %></label>
41-
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="Confirm Password" value="${confirm_password}" />
41+
<input type="password" class="form-control" name="confirm_password" id="confirm_password"
42+
placeholder="Confirm Password" value="<%= jspUtil.out("confirm_password") %>" />
4243
</div>
4344

4445
<div class="form-group">
4546
<label for="role_${role.roleId}"><%= jspUtil.label("label.role") %></label><br/>
4647
<c:forEach var="role" items="${systemRoles}" varStatus="status">
4748
<label class="radio-inline">
48-
<input type="checkbox" value="${role.roleKey}" name="roles"
49+
<input type="checkbox" value="<%= jspUtil.out("role.roleKey") %>" name="roles"
4950
id="role_${role.roleId}" <%
5051
if (jspUtil.getValue("role", Roles.class).isChecked()) {
5152
out.write("checked=\"checked\"");
5253
}
5354
%>/>
54-
${role.roleName}
55+
<%= jspUtil.out("role.roleName") %>
5556
</label>
5657
</c:forEach>
5758
</div>
5859

59-
<input type="hidden" name="offset" value="${offset}" />
60+
<input type="hidden" name="offset" value="<%= jspUtil.out("offset") %>" />
6061

6162

6263
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;<%= jspUtil.label("label.registration") %></button>
63-
<a href="<%= request.getContextPath() %>/admin.users/list/${offset}"
64+
<a href="<%= request.getContextPath() %>/admin.users/list/<%= jspUtil.out("offset") %>"
6465
class="btn btn-success" role="button"><i class="fa fa-list-ul"></i>&nbsp;<%= jspUtil.label("label.backlist") %></a>
6566

6667
</form>

src/main/webapp/WEB-INF/views/admin/users/view_edit.jsp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,33 @@ function deleteUser() {
3535

3636
<div class="form-group">
3737
<label for="userKey"><%= jspUtil.label("knowledge.signup.label.mail") %></label>
38-
<input type="text" class="form-control" name="userKey" id="userKey" placeholder="Mail Address" value="${userKey}" />
38+
<input type="text" class="form-control" name="userKey" id="userKey" placeholder="Mail Address" value="<%= jspUtil.out("userKey") %>" />
3939
</div>
4040
<div class="form-group">
4141
<label for="userName"><%= jspUtil.label("knowledge.signup.label.name") %></label>
42-
<input type="text" class="form-control" name="userName" id="userName" placeholder="User Name" value="${userName}" />
42+
<input type="text" class="form-control" name="userName" id="userName" placeholder="User Name" value="<%= jspUtil.out("userName") %>" />
4343
</div>
4444

4545
<div class="form-group">
4646
<label for="password"><%= jspUtil.label("knowledge.signup.label.password") %><%= jspUtil.label("knowledge.account.label.password.msg") %></label>
47-
<input type="password" class="form-control" name="password" id="password" placeholder="Password" value="${password}" />
47+
<input type="password" class="form-control" name="password" id="password" placeholder="Password" value="<%= jspUtil.out("password") %>" />
4848
</div>
4949
<div class="form-group">
5050
<label for="confirm_password"><%= jspUtil.label("knowledge.signup.label.confirm.password") %></label>
51-
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="Confirm Password" value="${confirm_password}" />
51+
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="Confirm Password" value="<%= jspUtil.out("confirm_password") %>" />
5252
</div>
5353

5454
<div class="form-group">
5555
<label for="role_${role.roleId}"><%= jspUtil.label("label.role") %></label><br/>
5656
<c:forEach var="role" items="${systemRoles}" varStatus="status">
5757
<label class="radio-inline">
58-
<input type="checkbox" value="${role.roleKey}" name="roles"
58+
<input type="checkbox" value="<%= jspUtil.out("role.roleKey") %>" name="roles"
5959
id="role_${role.roleId}" <%
6060
if (jspUtil.getValue("role", Roles.class).isChecked()) {
6161
out.write("checked=\"checked\"");
6262
}
6363
%>/>
64-
${role.roleName}
64+
<%= jspUtil.out("role.roleName") %>
6565
</label>
6666
</c:forEach>
6767
</div>
@@ -74,12 +74,12 @@ function deleteUser() {
7474
</p>
7575
</div>
7676

77-
<input type="hidden" name="offset" value="${offset}" />
78-
<input type="hidden" name="userId" value="${userId}" />
77+
<input type="hidden" name="offset" value="<%= jspUtil.out("offset") %>" />
78+
<input type="hidden" name="userId" value="<%= jspUtil.out("userId") %>" />
7979

8080
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;<%= jspUtil.label("label.update") %></button>
8181
<button type="button" class="btn btn-danger" onclick="deleteUser();"><i class="fa fa-remove"></i>&nbsp;<%= jspUtil.label("label.delete") %></button>
82-
<a href="<%= request.getContextPath() %>/admin.users/list/${offset}"
82+
<a href="<%= request.getContextPath() %>/admin.users/list/<%= jspUtil.out("offset") %>"
8383
class="btn btn-success" role="button"><i class="fa fa-list-ul"></i>&nbsp;<%= jspUtil.label("label.backlist") %></a>
8484

8585
</form>

0 commit comments

Comments
 (0)