Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:grails 1.1, ofchart 0.6
-
Patch Submitted:Yes
Description
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"
[...]
—