You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Roberto Benedetti (JIRA)" <ji...@apache.org> on 2015/11/24 12:15:10 UTC
[jira] [Created] (TIKA-1800) MediaType#parse does not decode
escaped special characters
Roberto Benedetti created TIKA-1800:
---------------------------------------
Summary: MediaType#parse does not decode escaped special characters
Key: TIKA-1800
URL: https://issues.apache.org/jira/browse/TIKA-1800
Project: Tika
Issue Type: Bug
Components: core
Affects Versions: 1.11
Reporter: Roberto Benedetti
Fix For: 1.12
Special characters in parameter value are escaped in canonical string representation but they are not unescaped when the canonical string representation is parsed.
{code:java}
MediaType mType = new MediaType(MediaType.APPLICATION_XML, "x-report", "#report@");
String cType = mType.toString(); // application/xml; x-report="#report\@"
assertEquals("application/xml; x-report=\"#report\\@\"", cType); // success
mType = MediaType.parse(cType);
String report = mType.getParameters().get("x-report"); // #report\@
assertEquals("#report@", report); // failure
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)