Commit 0bb225bd authored by Van's avatar Van

在分割标签时可以使用中文逗号

parent 6b61c3cc
......@@ -58,7 +58,7 @@ import org.json.JSONObject;
* Article management service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.6, Oct 26, 2013
* @version 1.1.1.6, Mar 28, 2015
* @since 0.3.5
*/
@Service
......@@ -274,11 +274,13 @@ public class ArticleMgmtService {
try {
final JSONObject article = requestJSONObject.getJSONObject(ARTICLE);
final String tagsString = article.optString(Article.ARTICLE_TAGS_REF);
article.put(Article.ARTICLE_TAGS_REF, tagsString.replaceAll(",", ","));
final String articleId = article.getString(Keys.OBJECT_ID);
// Set permalink
final JSONObject oldArticle = articleRepository.get(articleId);
final String permalink = getPermalinkForUpdateArticle(oldArticle, article, (Date) oldArticle.get(ARTICLE_CREATE_DATE));
article.put(ARTICLE_PERMALINK, permalink);
processTagsForArticleUpdate(oldArticle, article);
......@@ -462,7 +464,9 @@ public class ArticleMgmtService {
try {
// Step 1: Add tags
final String tagsString = article.optString(Article.ARTICLE_TAGS_REF);
String tagsString = article.optString(Article.ARTICLE_TAGS_REF);
tagsString = tagsString.replaceAll(",", ",");
article.put(Article.ARTICLE_TAGS_REF, tagsString);
final String[] tagTitles = tagsString.split(",");
final JSONArray tags = tag(tagTitles, article);
......
......@@ -29,7 +29,7 @@
<properties>
<servlet.version>2.5</servlet.version>
<slf4j.version>1.7.5</slf4j.version>
<org.b3log.latke.version>1.0.21</org.b3log.latke.version>
<org.b3log.latke.version>1.1.0</org.b3log.latke.version>
<maven-gae-plugin.version>0.9.0</maven-gae-plugin.version>
<gae.version>1.8.1.1</gae.version>
......@@ -42,7 +42,7 @@
<maven-resources-plugin.version>2.5</maven-resources-plugin.version>
<maven-surefire-plugin.version>2.9</maven-surefire-plugin.version>
<maven-license-plugin.version>1.9.0</maven-license-plugin.version>
<maven-checkstyle-plugin.version>2.7</maven-checkstyle-plugin.version>
<maven-checkstyle-plugin.version>2.15</maven-checkstyle-plugin.version>
<maven-javancss-plugin.version>2.0</maven-javancss-plugin.version>
<maven-javadoc-plugin.version>2.7</maven-javadoc-plugin.version>
<coveralls-maven-plugin.version>3.0.1</coveralls-maven-plugin.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment