commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pascal Schumacher (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TEXT-120) StringEscapeUtils UnescapeJson does not unescape double quotes and forward slash
Date Thu, 17 May 2018 18:30:00 GMT

     [ https://issues.apache.org/jira/browse/TEXT-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pascal Schumacher updated TEXT-120:
-----------------------------------
    Summary: StringEscapeUtils UnescapeJson does not unescape double quotes and forward slash
 (was: StringEscapeUtils UnescapeJson does not unescape)

> StringEscapeUtils UnescapeJson does not unescape double quotes and forward slash
> --------------------------------------------------------------------------------
>
>                 Key: TEXT-120
>                 URL: https://issues.apache.org/jira/browse/TEXT-120
>             Project: Commons Text
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Pedro Robles
>            Priority: Major
>
> Here's a unit test to show how the escape/unescape cycle doesn't return expected String.
>  
> {code:java}
> @Test
> public void testUnscape() {
>   String unscapeString = "double quote: \" and a forward slash: /";
>   String escapeString = StringEscapeUtils.escapeJson(unscapeString);
>   assertEquals("double quote: \" and a forward slash: \/", escapeString);
>   assertEquals(unscapeString, StringEscapeUtils.unescapeJson(escapeString));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message