Opened 19 years ago
Closed 18 years ago
#5245 closed defect (worksforme)
trac/newticket?description={some long description} is failing to correctly read the encoded url
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | ticket system | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
Per the instructions at: http://trac.corp.zenzui.com:8080/ZenZui/wiki/TracTickets
I have constructed a template for creating new entries in my trac system:
The entry seems to be correctly encoded, but the description field is garbled:
REPRO:
http://trac.corp.COMPANY.com:8080/COMPANY/newticket?summary=c:/bin/test/foo.java&keywords=c:/bin/test/foo.java&description=%5Cn---------------------%5CnSUMMARY%5Cn---------------------%5Cn%5Cn%201.%20%5Cn%5Cn---------------------%5CnCODE:%20c:/bin/test/foo.java%5Cn---------------------%5Cn%5Cn{{{%5Cnpackage%20com.tdg;%5Cnpublic%20class%20BasicJavaClass%20{%5Cnpublic%20void%20someMethod(String%20s)%20throws%20BasicJavaClassException%20{%5Cn}%5Cn}%5Cn%5Cn}}}%5Cn%5Cn---------------------%5CnREPRO%5Cn---------------------%5Cn%5Cn{{{%5Cn$%5Cn}}}%5Cn%5Cn
ERROR: This is what I get in the description field:
\n---------------------\nSUMMARY\n---------------------\n\n 1. \n\n---------------------\nCODE: c:/bin/test/foo.java\n---------------------\n\n{{{\npackage com.tdg
EXPECTED:
---------------------
SUMMARY
---------------------
1.
---------------------
CODE: c:/bin/test/foo.java
---------------------
{{{
package com.tdg;
public class BasicJavaClass {
public void someMethod(String s) throws BasicJavaClassException {
}
}
}}}
---------------------
REPRO
---------------------
{{{
$
}}}
Attachments (0)
Change History (2)
comment:1 by , 19 years ago
comment:2 by , 18 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
This is really a problem with how you encoded the URL, not with Trac. Using a URL encoding tool should make this easier for you. Here's the same creation line you used above (except against t.e.o.), and it works fine for me:
http://trac.edgewall.org/newticket?summary=c:/bin/test/foo.java&keywords=c:/bin/test/foo.java&description=---------------------%0ASUMMARY%0A---------------------%0A%0A%201.%0A%0A---------------------%0ACODE%3A%20c%3A%2Fbin%2Ftest%2Ffoo.java%0A---------------------%0A%0A%7B%7B%7B%0Apackage%20com.tdg%3B%0Apublic%20class%20BasicJavaClass%20%7B%0A%20%20%20%20%20%20%20%20public%20void%20someMethod%28String%20s%29%20throws%20BasicJavaClassException%20%7B%0A%20%20%20%20%20%20%20%20%7D%0A%7D%0A%0A%7D%7D%7D%0A%0A---------------------%0AREPRO%0A---------------------%0A%0A%7B%7B%7B%0A%24%0A%7D%7D%7D



See wiki:XmlRpcPlugin which offers a better API to manipulate Trac data remotely.