Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo
Commits
2033033f
Commit
2033033f
authored
Nov 20, 2012
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论同步至社区
parent
dfefaffd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
core/src/main/java/org/b3log/solo/service/CommentMgmtService.java
.../main/java/org/b3log/solo/service/CommentMgmtService.java
+2
-0
No files found.
core/src/main/java/org/b3log/solo/service/CommentMgmtService.java
View file @
2033033f
...
@@ -246,6 +246,7 @@ public final class CommentMgmtService {
...
@@ -246,6 +246,7 @@ public final class CommentMgmtService {
final
String
commentEmail
=
requestJSONObject
.
getString
(
Comment
.
COMMENT_EMAIL
).
trim
().
toLowerCase
();
final
String
commentEmail
=
requestJSONObject
.
getString
(
Comment
.
COMMENT_EMAIL
).
trim
().
toLowerCase
();
final
String
commentURL
=
requestJSONObject
.
optString
(
Comment
.
COMMENT_URL
);
final
String
commentURL
=
requestJSONObject
.
optString
(
Comment
.
COMMENT_URL
);
String
commentContent
=
requestJSONObject
.
getString
(
Comment
.
COMMENT_CONTENT
).
replaceAll
(
"\\n"
,
SoloServletListener
.
ENTER_ESC
);
String
commentContent
=
requestJSONObject
.
getString
(
Comment
.
COMMENT_CONTENT
).
replaceAll
(
"\\n"
,
SoloServletListener
.
ENTER_ESC
);
final
String
contentNoEsc
=
commentContent
;
commentContent
=
StringEscapeUtils
.
escapeHtml
(
commentContent
);
commentContent
=
StringEscapeUtils
.
escapeHtml
(
commentContent
);
final
String
originalCommentId
=
requestJSONObject
.
optString
(
Comment
.
COMMENT_ORIGINAL_COMMENT_ID
);
final
String
originalCommentId
=
requestJSONObject
.
optString
(
Comment
.
COMMENT_ORIGINAL_COMMENT_ID
);
// Step 1: Add comment
// Step 1: Add comment
...
@@ -305,6 +306,7 @@ public final class CommentMgmtService {
...
@@ -305,6 +306,7 @@ public final class CommentMgmtService {
// Step 5: Fire add comment event
// Step 5: Fire add comment event
final
JSONObject
eventData
=
new
JSONObject
();
final
JSONObject
eventData
=
new
JSONObject
();
eventData
.
put
(
Comment
.
COMMENT
,
comment
);
eventData
.
put
(
Comment
.
COMMENT
,
comment
);
comment
.
put
(
Comment
.
COMMENT_CONTENT
,
contentNoEsc
);
eventData
.
put
(
Article
.
ARTICLE
,
article
);
eventData
.
put
(
Article
.
ARTICLE
,
article
);
eventManager
.
fireEventSynchronously
(
new
Event
<
JSONObject
>(
EventTypes
.
ADD_COMMENT_TO_ARTICLE
,
eventData
));
eventManager
.
fireEventSynchronously
(
new
Event
<
JSONObject
>(
EventTypes
.
ADD_COMMENT_TO_ARTICLE
,
eventData
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment