diff options
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r-- | src/test/java/com/juick/tests/ApiTests.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/java/com/juick/tests/ApiTests.java b/src/test/java/com/juick/tests/ApiTests.java index 0317dbb4..1cd17bd6 100644 --- a/src/test/java/com/juick/tests/ApiTests.java +++ b/src/test/java/com/juick/tests/ApiTests.java @@ -17,7 +17,6 @@ import com.juick.service.UserService; import com.juick.service.search.SearchService; import com.juick.www.controllers.PageTemplates; import org.apache.commons.dbcp2.BasicDataSource; -import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.junit.Before; import org.junit.Test; @@ -181,9 +180,8 @@ public class ApiTests { Tag htmlTag = tagService.getTag(htmlTagName, true); TagStats htmlTagStats = new TagStats(); htmlTagStats.setTag(htmlTag); - String dbTagName = jdbcTemplate.queryForObject("select name from tags where name=?", String.class, StringEscapeUtils.escapeHtml4(htmlTagName)); - assertNotEquals("db tags should be escaped", dbTagName, htmlTag.getName()); - assertEquals("object tags should unescaped", htmlTag.getName(), StringEscapeUtils.unescapeHtml4(dbTagName)); + String dbTagName = jdbcTemplate.queryForObject("select name from tags where name=?", String.class, htmlTagName); + assertEquals("db tags should not be escaped", dbTagName, htmlTag.getName()); assertEquals("template should encode escaped tag in url and show escaped tag in name", "<a href=\"/tag/%3E_%3C\" rel=\"nofollow\">>_<</a>", templates.formatTags(Collections.singletonList(htmlTagStats))); int mid4 = messagesService.createMessage(user_id, "yoyoyo", null, null); |