Opened 11 years ago

Last modified 4 years ago

#105 released defect (fixed)

Plus sign is not encoded

Reported by: Artur Signell Owned by: Marc Englund
Priority: blocker Milestone: 4.0.0-beta-1-rc
Component: WebTerminalAdapter Version:
Keywords: encoding Cc:
Depends on:
Fv: no Pro Account: Mark as Priority


Writing + in a Textfield is not encoded and is thus interpreted as a space.
Writing e.g. +€ in a textfield causes a stack trace and the data not to be sent to the application at all. isHexDigit

at org.apache.tomcat.util.buf.UDecoder.convert(
at org.apache.tomcat.util.buf.UDecoder.convert(
at org.apache.tomcat.util.http.Parameters.processParameters(
at org.apache.coyote.tomcat4.CoyoteRequest.parseRequestParameters(
at org.apache.coyote.tomcat4.CoyoteRequest.getParameter(
at org.apache.coyote.tomcat4.CoyoteRequestFacade.getParameter(
at com.itmill.millstone.ajaxadapter.ApplicationManager.handleXmlHttpRequest(
at com.itmill.millstone.ajaxadapter.AjaxAdapterServlet.service(

Change history (8)

comment:1 Changed 11 years ago by Artur Signell

Can be fixed by changing

changes += i + "=" + this.variableStates[i] + "&";


changes += i + "=" + this.variableStates[i].replace("+","%2B") + "&";

in client.js.

Maybe not the "right" way to fix it but it seems to work. Don't know if this same thing happens with other characters or in other places in client.js / theme.js. At least unicode characters seem to be encoded correctly.

comment:2 Changed 11 years ago by anonymous

It seems that plus sign (+) is not the only problem, but all unicode characters are wrongly encoded as %u<4*hex>.

comment:3 Changed 11 years ago by anonymous

  • Milestone set to Release Candidate 4.0.0-beta

comment:4 Changed 11 years ago by Artur Signell

The following should be a correct fix:

In client.js change:





'application/x-www-form-urlencoded; charset=UTF-8')


this.variableStates[name] = escape(value);


this.variableStates[name] = encodeURIComponent(value);

comment:5 follow-up: Changed 11 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

comment:6 in reply to: ↑ 5 Changed 11 years ago by Joonas Lehtinen

Replying to anonymous:

PLEASE do login when posting... (otherwise this suspicious anonymous fixer takes all your credits :) )

comment:7 Changed 4 years ago by Artur Signell

  • Fv unset

comment:8 Changed 4 years ago by Artur Signell

  • Status changed from closed to released
Note: See TracTickets for help on using tickets.