Edgewall Software

Ticket #5245 (closed defect: worksforme)

Opened 21 months ago

Last modified 16 months ago

trac/newticket?description={some long description} is failing to correctly read the encoded url

Reported by: t.greenwoodgeer@… Owned by: jonas
Priority: normal Milestone:
Component: ticket system Version:
Severity: normal Keywords:
Cc:

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

Change History

Changed 21 months ago by eblot

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

Changed 16 months ago by sid

  • status changed from new to closed
  • resolution set to worksforme

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

Add/Change #5245 (trac/newticket?description={some long description} is failing to correctly read the encoded url)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.