Author: sdumitriu Date: 2008-02-15 03:46:28 +0100 (Fri, 15 Feb 2008) New Revision: 7746
Modified: xwiki-platform/web/trunk/standard/src/main/webapp/templates/create.vm xwiki-platform/web/trunk/standard/src/main/webapp/templates/login.vm xwiki-platform/web/trunk/standard/src/main/webapp/templates/rightsUI.vm Log: XWIKI-2103: Add encodeURI and decodeURI to Util, deprecate XWiki.getURLEncoded, Utils.encode, Utils.decode Fix templates Modified: xwiki-platform/web/trunk/standard/src/main/webapp/templates/create.vm =================================================================== --- xwiki-platform/web/trunk/standard/src/main/webapp/templates/create.vm 2008-02-15 02:42:02 UTC (rev 7745) +++ xwiki-platform/web/trunk/standard/src/main/webapp/templates/create.vm 2008-02-15 02:46:28 UTC (rev 7746) @@ -19,7 +19,7 @@ #set($pcontent = "#") #set($pcontent = $pcontent.concat("panelheader('${title}')${xwiki.getNl()}${xwiki.getNl()}#")) #set($pcontent = $pcontent.concat("panelfooter()")) -#set($pcontent = $xwiki.getURLEncoded($pcontent)) +#set($pcontent = $util.encodeURL($pcontent)) $response.sendRedirect($newdoc.getURL("inline", "template=${template}&Panels.PanelClass_0_name=${title}&Panels.PanelClass_0_content=$pcontent")) #else $response.sendRedirect($newdoc.getURL("view", "xpage=docalreadyexists")) @@ -48,12 +48,12 @@ ##$newdoc.getURL("edit", "template=${template}&parent=${parent}$auxparams")) #if($newdoc.isNew()) #if($tocreate == "post") -#set($etitle = $xwiki.getURLEncoded($title)) +#set($etitle = $util.encodeURI($title)) $response.sendRedirect($newdoc.getURL("inline", "parent=Blog.WebHome&template=XWiki.ArticleClassTemplate&XWiki.ArticleClass_0_title=$etitle")) #else -#set($etitle = $xwiki.getURLEncoded($title)) -#set($etemplate = $xwiki.getURLEncoded("${template}")) -#set($eparent = $xwiki.getURLEncoded("${parent}${auxparams}")) +#set($etitle = $util.encodeURI($title)) +#set($etemplate = $util.encodeURI("${template}")) +#set($eparent = $util.encodeURI("${parent}${auxparams}")) $response.sendRedirect($newdoc.getURL("edit", "template=${etemplate}&parent=${eparent}&title=$etitle")) #end #else @@ -77,7 +77,7 @@ ## #set($pcontent = "#") ## #set($pcontent = $pcontent.concat("panelheader('${title}')${xwiki.getNl()}${xwiki.getNl()}#")) ## #set($pcontent = $pcontent.concat("panelfooter()")) -## #set($pcontent = $xwiki.getURLEncoded($pcontent)) +## #set($pcontent = $util.encodeURI($pcontent)) ## $pcontent ## $response.sendRedirect($newdoc.getURL("inline", "template=${template}&Panels.PanelClass_0_name=${title}&Panels.PanelClass_0_content=$pcontent")) ## #else Modified: xwiki-platform/web/trunk/standard/src/main/webapp/templates/login.vm =================================================================== --- xwiki-platform/web/trunk/standard/src/main/webapp/templates/login.vm 2008-02-15 02:42:02 UTC (rev 7745) +++ xwiki-platform/web/trunk/standard/src/main/webapp/templates/login.vm 2008-02-15 02:46:28 UTC (rev 7746) @@ -8,7 +8,7 @@ #set($qs = "") #set($qs = $request.queryString) #if(!$request.getParameter("xredirect")) -#set($qs = "xredirect=$xwiki.getURLEncoded($doc.getURL('view'))&${qs}") +#set($qs = "xredirect=$util.encodeURI($doc.getURL('view'))&${qs}") #end $response.sendRedirect($xwiki.getURL("XWiki.XWikiLogin", "login", $qs)) #else Modified: xwiki-platform/web/trunk/standard/src/main/webapp/templates/rightsUI.vm =================================================================== --- xwiki-platform/web/trunk/standard/src/main/webapp/templates/rightsUI.vm 2008-02-15 02:42:02 UTC (rev 7745) +++ xwiki-platform/web/trunk/standard/src/main/webapp/templates/rightsUI.vm 2008-02-15 02:46:28 UTC (rev 7746) @@ -171,7 +171,7 @@ <td>$!doc.displayEdit($class.groups,"${class.name}_${obj.number}_",$obj)</td> <td>$!doc.displayEdit($class.levels,"${class.name}_${obj.number}_",$obj)</td> <td>$!doc.displayEdit($class.allow,"${class.name}_${obj.number}_",$obj)</td> - <td class="xwikibuttonlink"><a href="$doc.getURL("objectremove", "classname=${class.name}&classid=${obj.number}&xredirect=${xwiki.getURLEncoded($redirect)}")" onclick="return confirm('$msg.get("confirmobjectremove")')">$msg.get("Remove")</a></td> + <td class="xwikibuttonlink"><a href="$doc.getURL("objectremove", "classname=${class.name}&classid=${obj.number}&xredirect=${util.encodeURI($redirect)}")" onclick="return confirm('$msg.get("confirmobjectremove")')">$msg.get("Remove")</a></td> </tr> #end </table> _______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications