[ https://issues.apache.org/jira/browse/OFBIZ-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771148#action_12771148 ]
Patrick Antivackis edited comment on OFBIZ-2628 at 10/28/09 10:26 PM: ---------------------------------------------------------------------- Jacques, In fact I tried, as you proposed, to create a bug fix in the RequestHandler.makelink, but i stumble onto the following question: Why in the <@ofbizurl> tag, the & to separate parameters in the query string is written as & amp; like in the applications/product/webapp/catalog/find/sidecatalogs.ftl line 29 : <@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}& amp;productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl> and like in many other ftl templates (maybe all) Is it the mandatory way to do it and is it writtent clearly somewhere ? I ask this because,personnaly i always used only the & without the & in the ofbizurl tag. So if it is the official way to write queryString, i can do the patch, else if it is not, i can't because the queryString would contains '&' that doesn't mean 'separation of parameters', like dvd+r is in fact output dvd& #43;r by freemarker ${product.productId} was (Author: patrick.antivackis): Jacques, In fact I tried, as you proposed, to create a bug fix in the RequestHandler.makelink, but i stumble onto the following question: Why in the <@ofbizurl> tag, the & to separate parameters in the query string is written as & amp; like in the applications/product/webapp/catalog/find/sidecatalogs.ftl line 29 : <@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}& amp;productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl> and like in many other ftl templates (maybe all) Is it the mandatory way to do it and is it writtent clearly somewhere ? I ask this because,personnaly i always used only the & without the & in the ofbizurl tag. So if it is the official way to write queryString, i can do the patch, else if it is not, i can't because the queryString would contains '&' that doesn't mean 'separation of parameters', like dvd+r is in fact output dvd+r by freemarker ${product.productId} > No Url encoding for get parameters > ---------------------------------- > > Key: OFBIZ-2628 > URL: https://issues.apache.org/jira/browse/OFBIZ-2628 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 4.0, Release Branch 9.04, SVN trunk > Environment: All > Reporter: Patrick Antivackis > Priority: Critical > Attachments: OFBIZ-2628-widget.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Let's say I want to create a new category which ID is DVD+R > Creation is ok through the admin interface, but whenever i want to access > this category, the get parameter productCategoryId=.... of the url is wrong > as it's not url encoded, so we have : > https://localhost:8443/catalog/control/EditCategory?productCategoryId=DVD+R > instead of > https://localhost:8443/catalog/control/EditCategory?productCategoryId=DVD%2BR > Both <@ofbizUrl> tag and menu widgets are not encoding get parameters. > Way to correct : > framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java modify the > makeLink function > framework/widget/src/org/ofbiz/widget/WidgetWorker.java : function > buildhyperlinkUrl need to use defaultWebEncoder.encodeForURL instead of > simpleEncoder > Beofre i do the fix, can a core developper let me know about possible side > effects -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.