[Phpmyadmin-devel] URL parameter separator and Jquery - #3733
Marc Delisle
marc at infomarc.info
Sun Apr 13 22:26:41 CEST 2014
Le 2014-04-13 09:59, Hugues Peccatte a écrit :
> 2014-04-13 15:47 GMT+02:00 Marc Delisle <marc at infomarc.info
> <mailto:marc at infomarc.info>>:
>
> Le 2014-04-13 09:30, Hugues Peccatte a écrit :
> > Hi,
> >
> > I'm working on bug ticket
> http://sourceforge.net/p/phpmyadmin/bugs/3733/
> > I already replaced all & in PHP files by the separator defined in
> php.ini.
> > I also replaced a part of & in JS files (almost all). But I still have
> > an issue… with Jquery method $.get…
> >
> > This method have many parameters, and one could be a JSON object
> of URL
> > parameters.
> > Something like this:
> > var params = {
> > aPath: $expandElem.find('span.aPath').text(),
> > vPath: $expandElem.find('span.vPath').text()
> > };
> > And this:
> > $.get(url, params, function (data) {
> > …
> > });
> >
> > Imagine that you set the arg_separator to "|" in your php.ini, the
>
> But this would not follow the recommendation in
> http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2.
>
>
> Yes, I agree, but should we so remove the use
> of ini_get('arg_separator.input') in PMA_URL_getArgSeparator as there is
> W3C recommandations? And so define that & char is mandatory? (It would
> be easier and the ticket could be closed, I believe.)
I think you mean "define that the semicolon (;) is mandatory". But at
the same time, the directive exists in php.ini so we should try to
respect it, so support whatever is there as a separator (hoping that
it's the ampersand or the semicolon).
>
> Or should we deal with the fact that we could have & or ";" as a
> separator? And so find a way to manage it with Jquery?
This would be the best way to go.
>
> Thanks for you answers.
>
> Hugues.
>
>
>
> > result will be:
> > - initial URL: http://myurl.com/mypage.php?p1=v1|p2=V2
> > - params: var params = {
> > p3: "v3",
> > p4: "v4"
> > };
> > - generated URL: http://myurl.com/mypage.php?p1=v1|p2=V2&p3=v3|p4=v4
> >
> > As you can see, there is a & between the initial URL and the added
> > parameters…
> >
> > Do you know a way to manage the arg_separator used by Jquery please?
> >
> > Thanks a lot !
> > Hugues.
>
> --
> Marc Delisle
>
>
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
>
>
>
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
--
Marc Delisle
More information about the Developers
mailing list