Issue Details (XML | Word | Printable)

Key: GRAILSPLUGINS-1157
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Graeme Rocher
Reporter: Philip Stehlik
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Grails Plugins

Urls are not URL Encoded which prevents creating chars with multiple parmeters in data-file URL

Created: 13/May/09 06:22 PM   Updated: 13/May/09 06:22 PM
Component/s: Grails-OFChart
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment: grails 1.1, ofchart 0.6

Patch Submitted: Yes


 Description  « Hide

The URL for the data-file parameter of the of-chart swf is not URL encoded by default.
This prevents from using the plugin with URLs to e.g. a controller and having multiple parameters in the URL.

a call like this:

ofchart.chart(name:name,
url:"${ createLink(controller:'someDomain', action: 'renderAsChartJsonFromParams', params:params)}",
width:width,
height:height)

does not work as the params are not getting transported accordingly.

The fix is to change the following (in package org.codehaus.groovy.grails.plugins.ofchart.taglib)
— GraphTagLib.groovy current –
[...]
18 String url = attrs.url? attrs.remove("url") : ""
19
20 out << "<div id='$name' name='$name'></div>\n"
[...]

— GraphTagLib.groovy fixed –
[...]
18 String url = attrs.url? attrs.remove("url") : ""
19 url = url.encodeAsURL()
20 out << "<div id='$name' name='$name'></div>\n"
[...]



There are no comments yet on this issue.