Ticket #984 (closed Defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Creating new topicmap name with ampersand in its name truncated

Reported by: Malte Owned by: jri
Priority: Major Milestone: Release 4.8.1
Component: DeepaMehta Standard Distribution Version: 4.8
Keywords: Cc: jri
Complexity: 3 Area: GUI / Usability
Module: deepamehta-webclient

Description

Doing "New Topicmap", entering "SVG & Design" in the name, submitting the form gives me a topicmap named "SVG ".

Change History

comment:1 Changed 9 years ago by Malte

Sorry, here are the details.

I am using Firefox 46.0.1, DeepaMehta 4.8.1-SNAPSHOT (latest on 'master') on ubuntu. I have the feeling that this might be deepamehta unspecific cause i experienced the same behaviour recently in another webapp (with the exact same browser/os setup).

comment:2 Changed 9 years ago by jri

Confirmed!
The & in the request is not properly URL-encoded.
This is a bug in the Webclient's RestClient?.
Will be fixed in DM 4.8.1
Thank you for reporting!

comment:3 Changed 9 years ago by jri

  • Owner set to jri
  • Status changed from new to accepted

comment:4 Changed 9 years ago by Jörg Richter <jri@…>

In 45728ae957bb9145514436b2a13ce80540ad5c84/deepamehta:

Webclient: fix URL-encoding (#984).

The query parameters as send by the Webclient's RESTClient are properly URL-encoded.

As a consequence creating topicmaps whose name contains a & is now possible.

Thanks to Malte for reporting!

See #984.

comment:5 Changed 9 years ago by Jörg Richter <jri@…>

In 6660e3ccb57d880cf19a1c12bad9589323addc8d/deepamehta:

Webclient: revise RequestParameter? API (#984).

BREAKING CHANGE

RESTClient utilities:

  • createRequestParameter() is renamed to queryParams()
  • to_query_string() must not be called anymore

Old code:

dm4c.restc.my_request = function() {
    var params = this.createRequestParameter({name: value, name: value})
    this.request("GET", "/my/resource" + params.to_query_string())

New code:

dm4c.restc.my_request = function() {
    var params = this.queryParams({name: value, name: value})
    this.request("GET", "/my/resource" + params)

Note: passing an object as param value is not supported anymore, just string, number, boolean.

See #984.

comment:6 Changed 9 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.