Skip to content

Commit 501b007

Browse files
88250Vanessa219
authored andcommitted
1 parent e571e16 commit 501b007

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/main/java/org/b3log/solo/processor/CommentProcessor.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.b3log.solo.service.PreferenceQueryService;
3636
import org.b3log.solo.service.UserMgmtService;
3737
import org.b3log.solo.service.UserQueryService;
38+
import org.b3log.solo.util.Emotions;
3839
import org.b3log.solo.util.Skins;
3940
import org.json.JSONObject;
4041

@@ -53,7 +54,7 @@
5354
*
5455
* @author <a href="http://88250.b3log.org">Liang Ding</a>
5556
* @author ArmstrongCN
56-
* @version 1.3.2.13, Feb 18, 2017
57+
* @version 1.3.2.14, May 21, 2017
5758
* @since 0.3.1
5859
*/
5960
@RequestProcessor
@@ -185,7 +186,10 @@ public void addPageComment(final HTTPRequestContext context) throws ServletExcep
185186
final StringWriter stringWriter = new StringWriter();
186187
template.process(dataModel, stringWriter);
187188
stringWriter.close();
188-
addResult.put("cmtTpl", stringWriter.toString());
189+
String cmtTpl = stringWriter.toString();
190+
cmtTpl = Emotions.convert(cmtTpl);
191+
192+
addResult.put("cmtTpl", cmtTpl);
189193
} catch (final Exception e) {
190194
// 1.9.0 向后兼容
191195
}
@@ -290,7 +294,10 @@ public void addArticleComment(final HTTPRequestContext context) throws ServletEx
290294
final StringWriter stringWriter = new StringWriter();
291295
template.process(dataModel, stringWriter);
292296
stringWriter.close();
293-
addResult.put("cmtTpl", stringWriter.toString());
297+
String cmtTpl = stringWriter.toString();
298+
cmtTpl = Emotions.convert(cmtTpl);
299+
300+
addResult.put("cmtTpl", cmtTpl);
294301
} catch (final Exception e) {
295302
// 1.9.0 向后兼容
296303
}

0 commit comments

Comments
 (0)