|
35 | 35 | import org.b3log.solo.service.PreferenceQueryService;
|
36 | 36 | import org.b3log.solo.service.UserMgmtService;
|
37 | 37 | import org.b3log.solo.service.UserQueryService;
|
| 38 | +import org.b3log.solo.util.Emotions; |
38 | 39 | import org.b3log.solo.util.Skins;
|
39 | 40 | import org.json.JSONObject;
|
40 | 41 |
|
|
53 | 54 | *
|
54 | 55 | * @author <a href="http://88250.b3log.org">Liang Ding</a>
|
55 | 56 | * @author ArmstrongCN
|
56 |
| - * @version 1.3.2.13, Feb 18, 2017 |
| 57 | + * @version 1.3.2.14, May 21, 2017 |
57 | 58 | * @since 0.3.1
|
58 | 59 | */
|
59 | 60 | @RequestProcessor
|
@@ -185,7 +186,10 @@ public void addPageComment(final HTTPRequestContext context) throws ServletExcep
|
185 | 186 | final StringWriter stringWriter = new StringWriter();
|
186 | 187 | template.process(dataModel, stringWriter);
|
187 | 188 | stringWriter.close();
|
188 |
| - addResult.put("cmtTpl", stringWriter.toString()); |
| 189 | + String cmtTpl = stringWriter.toString(); |
| 190 | + cmtTpl = Emotions.convert(cmtTpl); |
| 191 | + |
| 192 | + addResult.put("cmtTpl", cmtTpl); |
189 | 193 | } catch (final Exception e) {
|
190 | 194 | // 1.9.0 向后兼容
|
191 | 195 | }
|
@@ -290,7 +294,10 @@ public void addArticleComment(final HTTPRequestContext context) throws ServletEx
|
290 | 294 | final StringWriter stringWriter = new StringWriter();
|
291 | 295 | template.process(dataModel, stringWriter);
|
292 | 296 | stringWriter.close();
|
293 |
| - addResult.put("cmtTpl", stringWriter.toString()); |
| 297 | + String cmtTpl = stringWriter.toString(); |
| 298 | + cmtTpl = Emotions.convert(cmtTpl); |
| 299 | + |
| 300 | + addResult.put("cmtTpl", cmtTpl); |
294 | 301 | } catch (final Exception e) {
|
295 | 302 | // 1.9.0 向后兼容
|
296 | 303 | }
|
|
0 commit comments